## Automatically generated incremental diff
## From:   linux-2.2.14-pre14
## To:     linux-2.2.14-pre15
## Robot:  $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp $

diff -urN linux-2.2.14-pre14/arch/i386/config.in linux-2.2.14-pre15/arch/i386/config.in
--- linux-2.2.14-pre14/arch/i386/config.in	1999-08-09 12:04:38.000000000 -0700
+++ linux-2.2.14-pre15/arch/i386/config.in	2003-08-15 15:09:49.000000000 -0700
@@ -126,6 +126,8 @@
   source net/Config.in
 fi
 
+source drivers/telephony/Config.in
+
 mainmenu_option next_comment
 comment 'SCSI support'
 
diff -urN linux-2.2.14-pre14/Documentation/Configure.help linux-2.2.14-pre15/Documentation/Configure.help
--- linux-2.2.14-pre14/Documentation/Configure.help	2003-08-15 15:09:48.000000000 -0700
+++ linux-2.2.14-pre15/Documentation/Configure.help	2003-08-15 15:09:49.000000000 -0700
@@ -11926,9 +11926,9 @@
   IPL device on another question, that pops up, when you select
   CONFIG_IPLABE.
 
-IPL from a /390 tape unit
+IPL from a S/390 tape unit
 CONFIG_IPL_TAPE
-  Select this option if you want to IPL the image from a Tape.
+  Select this option if you want to IPL the image from a tape.
 
 IPL from a virtual card reader emulated by VM/ESA
 CONFIG_IPL_RDR_VM
@@ -11981,6 +11981,24 @@
    See "linux/Documentation/cpqarray.txt" for the current list of 
    boards supported by this driver, and for further information 
    on the use of this driver. 
+
+QuickNet Internet LineJack/PhoneJack support
+CONFIG_PHONE_IXJ
+  Say M if you have a telephony card manufactured by Quicknet
+  Technologies, Inc.  These include the Internet PhoneJACK and
+  Internet LineJACK Telephony Cards.
+
+  For the ISA versions of these products, you can configure the
+  cards using the isapnp tools (pnpdump/isapnp) or you can use the
+  backported isapnp module.  Please read:
+
+  /usr/src/linux/Documentation/telephony/ixj.txt.
+
+  For more information on these cards, see Quicknet's website at:
+  http://www.quicknet.net/
+
+  If you do not have any Quicknet telephony cards, you can safely
+  ignore this option.
  
 #
 # A couple of things I keep forgetting:
diff -urN linux-2.2.14-pre14/Documentation/devices.tex linux-2.2.14-pre15/Documentation/devices.tex
--- linux-2.2.14-pre14/Documentation/devices.tex	1998-08-16 11:35:51.000000000 -0700
+++ linux-2.2.14-pre15/Documentation/devices.tex	1969-12-31 16:00:00.000000000 -0800
@@ -1,2165 +0,0 @@
-\documentstyle{article}
-% $Id: devices.tex,v 1.14 1998/08/10 22:39:24 hpa Exp $
-% ---------------------------------------------------------------------------
-% Adopt somewhat reasonable margins, so it doesn't take a million
-% pages to print... :-)  If you're actually putting this in print, you
-% may wish to change these.
-\oddsidemargin=0in
-\textwidth=6.5in
-\topmargin=0in
-\headheight=0.5in
-\headsep=0.25in
-\textheight=7.5in
-\footskip=0.75in
-\footheight=0.5in
-%
-\begin{document}
-\newcommand{\file}{\tt}			% Style to use for a filename
-\newcommand{\url}{\it}		        % Style to use for an URL
-\newcommand{\hex}{\tt}			% Style to use for a hex number
-\newcommand{\ud}{(Under development)}	% Abbreviation
-\newcommand{\1}{\({}^1\)}
-\newcommand{\2}{\({}^2\)}
-\newcommand{\3}{\({}^3\)}
-\newcommand{\4}{\({}^4\)}
-\newlength{\dig}
-\settowidth{\dig}{0}			% Get width of digits
-\newcommand{\num}[2]{\makebox[#1\dig][r]{#2}}
-\newcommand{\major}[4]{\num{3}{#1}#2 \> #3 \> #4 \\}
-\newcommand{\minor}[3]{\> \> \num{3}{#1} \> {\file #2} \> #3 \\}
-\newcommand{\minordots}{\> \> \> \dots \\}
-\newenvironment{devicelist}%
- {\begin{tabbing}%
-000--000 \= blockxxx \= 000 \= {\file /dev/input/keyboardxxx} \= foo \kill}%
- {\end{tabbing}}
-\newcommand{\link}[4]{{\file #1} \> {\file #2} \> #3 \> #4 \\}
-\newcommand{\vlink}[4]{{\file #1} \> {\em #2 \/} \> #3 \> #4 \\}
-\newcommand{\node}[3]{{\file #1} \> #2 \> #3 \\}
-\newcommand{\tum}{$''$}
-\newenvironment{nodelist}%
- {\begin{tabbing}%
-{\file /dev/crambamboli} \= {\file /proc/self/fd/99} \= symbolicxxx \=
-foo \kill}%
- {\end{tabbing}}
-%
-% If you reformat this document, *please* make sure this information
-% gets included!  This list changes frequently, so it is crucial to
-% know the date of the revision.
-%
-\title{{\bf Linux Allocated Devices}}
-\author{Maintained by H. Peter Anvin $<$hpa@zytor.com$>$}
-\date{Last revised: August 10, 1998}
-\maketitle
-%
-\noindent
-This list is the Linux Device List, the official registry of allocated
-device numbers and {\file /dev} directory nodes for the Linux
-operating system.
-
-The latest version of this list is included with the Linux kernel
-sources in \LaTeX\ and ASCII form.  It is also available separately
-from {\url ftp://ftp.kernel.org/pub/linux/docs/device-list/}.  In case
-of discrepancy between the text and \LaTeX\ versions, the \LaTeX\
-version is authoritative.
-
-This document is included by reference into the Linux Filesystem
-Standard (FSSTND).  The FSSTND is available from
-{\url ftp://tsx-11.mit.edu/pub/linux/docs/linux-standards/fsstnd/}.
-
-Allocations marked (68k/Amiga) apply to Linux/68k on the Amiga
-platform only.  Allocations marked (68k/Atari) apply to Linux/68k on
-the Atari platform only.
-
-This document is in the public domain.  The author requests, however,
-that semantically altered versions are not distributed without
-permission of the author, assuming the author can be contacted without
-an unreasonable effort.
-
-In particular, please don't sent patches for this list to Linus, at
-least not without contacting me first.
-
-I do not have any information about these devices beyond what appears
-on this list.  Any such information requests will be deleted without
-reply.
-
-\section{How to submit a device entry}
-
-To have a major number allocated, or a minor number in situations
-where that applies (e.g. busmice), please contact me with the
-appropriate device information.  Also, if you have additional
-information regarding any of the devices listed below, or if I have
-made a mistake, I would greatly appreciate a note.
-
-I do, however, make two requests about the nature of your report.
-This is necessary for me to be able to keep this list up to date and
-correct in a timely manner.  First of all, {\em please\/} include the
-word ``device'' in the subject so your mail won't accidentally get
-buried!  I receive hundreds of email messages a day, so mail sent with
-other subjects may very well get lost in the avalanche.
-
-Second, please include a description of the device {\em in the same
-format as this list\/}.  The reason for this is that it is the only
-way I have found to ensure I have all the requisite information to
-publish your device and avoid conflicts.
-
-Your cooperation is appreciated.
-
-\section{Major numbers}
-
-\begin{devicelist}
-\major{ 0}{}{     }{Unnamed devices (e.g. non-device mounts)}
-\major{ 1}{}{char }{Memory devices}
-\major{  }{}{block}{RAM disk}
-\major{ 2}{}{char }{Pseudo-TTY masters}
-\major{  }{}{block}{Floppy disks}
-\major{ 3}{}{char }{Pseudo-TTY slaves}
-\major{  }{}{block}{First MFM, RLL or IDE hard disk/CD-ROM interface}
-\major{ 4}{}{char }{TTY devices}
-\major{ 5}{}{char }{Alternate TTY devices}
-\major{ 6}{}{char }{Parallel printer devices}
-\major{ 7}{}{char }{Virtual console access devices}
-\major{  }{}{block}{Loopback devices}
-\major{ 8}{}{block}{SCSI disk devices (0-15)}
-\major{ 9}{}{char }{SCSI tape devices}
-\major{  }{}{block}{Metadisk (RAID) devices}
-\major{10}{}{char }{Non-serial mice, misc features}
-\major{11}{}{char }{Raw keyboard device}
-\major{  }{}{block}{SCSI CD-ROM devices}
-\major{12}{}{char }{QIC-02 tape}
-\major{  }{}{block}{MSCDEX CD-ROM callback support}
-\major{13}{}{char }{PC speaker}
-\major{  }{}{block}{8-bit MFM/RLL/IDE controller}
-\major{14}{}{char }{Sound card}
-\major{  }{}{block}{BIOS harddrive callback support}
-\major{15}{}{char }{Joystick}
-\major{  }{}{block}{Sony CDU-31A/CDU-33A CD-ROM}
-\major{16}{}{char }{Non-SCSI scanners}
-\major{  }{}{block}{GoldStar CD-ROM}
-\major{17}{}{char }{Chase serial card}
-\major{  }{}{block}{Optics Storage CD-ROM}
-\major{18}{}{char }{Chase serial card -- alternate devices}
-\major{  }{}{block}{Sanyo CD-ROM}
-\major{19}{}{char }{Cyclades serial card}
-\major{  }{}{block}{``Double'' compressed disk}
-\major{20}{}{char }{Cyclades serial card -- alternate devices}
-\major{  }{}{block}{Hitachi CD-ROM}
-\major{21}{}{char }{Generic SCSI access}
-\major{  }{}{block }{Acorn MFM hard drive interface}
-\major{22}{}{char }{Digiboard serial card}
-\major{  }{}{block}{Second IDE hard disk/CD-ROM interface}
-\major{23}{}{char }{Digiboard serial card -- alternate devices}
-\major{  }{}{block}{Mitsumi proprietary CD-ROM}
-\major{24}{}{char }{Stallion serial card}
-\major{  }{}{block}{Sony CDU-535 CD-ROM}
-\major{25}{}{char }{Stallion serial card -- alternate devices}
-\major{  }{}{block}{First Matsushita (Panasonic/SoundBlaster) CD-ROM}
-\major{26}{}{char }{Quanta WinVision frame grabber}
-\major{  }{}{block}{Second Matsushita (Panasonic/SoundBlaster) CD-ROM}
-\major{27}{}{char }{QIC-117 tape}
-\major{  }{}{block}{Third Matsushita (Panasonic/SoundBlaster) CD-ROM}
-\major{28}{}{char }{Stallion serial card -- card programming}
-\major{  }{}{char }{Atari SLM ACSI laser printer (68k/Atari)}
-\major{  }{}{block}{Fourth Matsushita (Panasonic/SoundBlaster) CD-ROM}
-\major{  }{}{block}{ACSI disk/CD-ROM (68k/Atari)}
-\major{29}{}{char }{Universal frame buffer}
-\major{  }{}{block}{Aztech/Orchid/Okano/Wearnes CD-ROM}
-\major{30}{}{char }{iBCS-2 compatibility devices}
-\major{  }{}{block}{Philips LMS CM-205 CD-ROM}
-\major{31}{}{char }{MPU-401 MIDI}
-\major{  }{}{block}{ROM/flash memory card}
-\major{32}{}{char }{Specialix serial card}
-\major{  }{}{block}{Philips LMS CM-206 CD-ROM}
-\major{33}{}{char }{Specialix serial card -- alternate devices}
-\major{  }{}{block}{Third IDE hard disk/CD-ROM interface}
-\major{34}{}{char }{Z8530 HDLC driver}
-\major{  }{}{block}{Fourth IDE hard disk/CD-ROM interface}
-\major{35}{}{char }{tclmidi MIDI driver}
-\major{  }{}{block}{Slow memory ramdisk}
-\major{36}{}{char }{Netlink support}
-\major{  }{}{block}{MCA ESDI hard disk}
-\major{37}{}{char }{IDE tape}
-\major{  }{}{block}{Zorro II ramdisk}
-\major{38}{}{char }{Myricom PCI Myrinet board}
-\major{  }{}{block}{Reserved for Linux/AP+}
-\major{39}{}{char }{ML-16P experimental I/O board}
-\major{  }{}{block}{Reserved for Linux/AP+}
-\major{40}{}{char }{Matrox Meteor frame grabber}
-\major{  }{}{block}{Syquest EZ135 parallel port removable drive}
-\major{41}{}{char }{Yet Another Micro Monitor}
-\major{  }{}{block}{MicroSolutions BackPack parallel port CD-ROM}
-\major{42}{}{}{Demo/sample use}
-\major{43}{}{char }{isdn4linux virtual modem}
-\major{  }{}{block}{Network block devices}
-\major{44}{}{char }{isdn4linux virtual modem -- alternate devices}
-\major{  }{}{block}{Flash Translation Layer (FTL) filesystems}
-\major{45}{}{char }{isdn4linux ISDN BRI driver}
-\major{  }{}{block}{Parallel port IDE disk devices}
-\major{46}{}{char }{Comtrol Rocketport serial card}
-\major{  }{}{block}{Parallel port ATAPI CD-ROM devices}
-\major{47}{}{char }{Comtrol Rocketport serial card -- alternate devices}
-\major{  }{}{block}{Parallel port ATAPI disk devices}
-\major{48}{}{char }{SDL RISCom serial card}
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\major{49}{}{char }{SDL RISCom serial card -- alternate devices}
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\major{50}{}{char}{Reserved for GLINT}
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\major{51}{}{char }{Baycom radio modem}
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\major{52}{}{char }{Spellcaster DataComm/BRI ISDN card}
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\major{53}{}{char }{BDM interface for remote debugging MC683xx microcontrollers}
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\major{54}{}{char }{Electrocardiognosis Holter serial card}
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\major{55}{}{char }{DSP56001 digital signal processor}
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\major{56}{}{char }{Apple Desktop Bus}
-\major{  }{}{block}{Fifth IDE hard disk/CD-ROM interface}
-\major{57}{}{char }{Hayes ESP serial card}
-\major{  }{}{block}{Sixth IDE hard disk/CD-ROM interface}
-\major{58}{}{char }{Hayes ESP serial card -- alternate devices}
-\major{  }{}{block}{Reserved for logical volume manager}
-\major{59}{}{char }{sf firewall package}
-\major{60}{--63}{}{Local/experimental use}
-\major{64}{}{char }{ENskip kernel encryption package}
-\major{65}{}{char }{Sundance ``plink'' Transputer boards}
-\major{  }{}{block}{SCSI disk devices (16-31)}
-\major{66}{}{char }{YARC PowerPC PCI coprocessor card}
-\major{  }{}{block}{SCSI disk devices (32-47)}
-\major{67}{}{char }{Coda network filesystem}
-\major{  }{}{block}{SCSI disk devices (48-63)}
-\major{68}{}{char }{CAPI 2.0 interface}
-\major{  }{}{block}{SCSI disk devices (64-79)}
-\major{69}{}{char }{MA16 numeric accelerator card}
-\major{  }{}{block}{SCSI disk devices (80-95)}
-\major{70}{}{char }{SpellCaster Protocol Services Interface}
-\major{  }{}{block}{SCSI disk devices (96-111)}
-\major{71}{}{char }{Computone IntelliPort II serial card}
-\major{  }{}{block}{SCSI disk devices (112-127)}
-\major{72}{}{char }{Computone IntelliPort II serial card -- alternate devices}
-\major{73}{}{char }{Computone IntelliPort II serial card -- control devices}
-\major{74}{}{char }{SCI bridge}
-\major{75}{}{char }{Specialix IO8+ serial card}
-\major{76}{}{char }{Specialix IO8+ serial card -- alternate devices}
-\major{77}{}{char }{ComScire Quantum Noise Generator}
-\major{78}{}{char }{PAM Software's multimodem boards}
-\major{79}{}{char }{PAM Software's multimodem boards -- alternate devices}
-\major{80}{}{char }{Photometrics AT200 CCD camera}
-\major{81}{}{char }{video4linux}
-\major{82}{}{char }{WiNRADiO communications receiver card}
-\major{83}{}{char }{Teletext/videotext interfaces}
-\major{84}{}{char }{Ikon 1011[57] Versatec Greensheet Interface}
-\major{85}{}{char }{Linux/SGI shared memory input queue}
-\major{86}{}{char }{SCSI media changer}
-\major{87}{}{char }{Sony Control-A1 stereo control bus}
-\major{88}{}{char }{COMX synchronous serial card}
-\major{89}{}{char }{I$^2$C bus interface}
-\major{90}{}{char }{Memory Technology Device (RAM, ROM, Flash)}
-\major{91}{}{char }{CAN-Bus controller}
-\major{92}{}{char }{Reserved for ith Kommunikationstechnik MIC ISDN card}
-\major{93}{}{char }{IBM Smart Capture Card frame grabber}
-\major{94}{}{char }{miroVIDEO DC10/30 capture/playback device}
-\major{95}{}{char }{IP filter}
-\major{96}{}{char }{Parallel port ATAPI tape devices}
-\major{97}{}{char }{Parallel port generic ATAPI interface}
-\major{98}{}{char }{Control and Mesurement Device (comedi)}
-\major{99}{}{char }{Raw parallel ports}
-\major{100}{}{char }{POTS (analogue telephone) A/B port}
-\major{101}{}{char }{Motorola DSP 56xxx board}
-\major{102}{}{char }{Philips SAA5249 Teletext signal decoder}
-\major{103}{}{char }{Arla network file system}
-\major{104}{}{char }{Flash BIOS support}
-\major{105}{}{char }{Comtrol VS-1000 serial card}
-\major{106}{}{char }{Comtrol VS-1000 serial card -- alternate devices}
-\major{107}{}{char }{3Dfx Voodoo Graphics device}
-\major{108}{}{char }{Device independent PPP interface}
-\major{109}{}{char }{Reserved for logical volume manager}
-\major{110}{}{char }{miroMEDIA Surround board}
-\major{111}{--119}{}{Unallocated}
-\major{120}{--127}{}{Local/experimental use}
-\major{128}{--135}{char }{Unix98 PTY masters}
-\major{136}{--143}{char }{Unix98 PTY slaves}
-\major{144}{--239}{}{Unallocated}
-\major{240}{--254}{}{Local/experimental use}
-\major{255}{}{}{Reserved}
-\end{devicelist}
-
-\section{Minor numbers}
-
-\begin{devicelist}
-\major{ 0}{}{}{Unnamed devices (e.g. non-device mounts)}
-	\minor{0}{}{reserved as null device number}
-\end{devicelist}
-
-\begin{devicelist}
-\major{ 1}{}{char}{Memory devices}
-	\minor{1}{/dev/mem}{Physical memory access}
-	\minor{2}{/dev/kmem}{Kernel virtual memory access}
-	\minor{3}{/dev/null}{Null device}
-	\minor{4}{/dev/port}{I/O port access}
-	\minor{5}{/dev/zero}{Null byte source}
-	\minor{6}{/dev/core}{OBSOLETE -- should be a link to {\file /proc/kcore}}
-	\minor{7}{/dev/full}{Returns ENOSPC on write}
-	\minor{8}{/dev/random}{Nondeterministic random number generator}
-	\minor{9}{/dev/urandom}{Less secure, but faster random number generator}
-\\
-\major{}{}{block}{RAM disk}
-	\minor{0}{/dev/ram0}{First RAM disk}
-	\minordots
-	\minor{7}{/dev/ram7}{Eighth RAM disk}
-	\minor{250}{/dev/initrd}{Initial RAM disk}
-\end{devicelist}
-
-\noindent
-Earlier kernels had {\file /dev/ramdisk} (1, 1) here.  {\file /dev/initrd}
-refers to a RAM disk which was preloaded by the boot loader.
-
-\begin{devicelist}
-\major{ 2}{}{char}{Pseudo-TTY masters}
-	\minor{0}{/dev/ptyp0}{First PTY master}
-	\minor{1}{/dev/ptyp1}{Second PTY master}
-	\minordots
-	\minor{255}{/dev/ptyef}{256th PTY master}
-\end{devicelist}
-
-\noindent
-Pseudo-TTY's are named as follows:
-\begin{itemize}
-\item Masters are {\file pty}, slaves are {\file tty};
-\item the fourth letter is one of {\file pqrstuvwxyzabcde} indicating
-the 1st through 16th series of 16 pseudo-ttys each, and
-\item the fifth letter is one of {\file 0123456789abcdef} indicating
-the position within the series.
-\end{itemize}
-
-\noindent
-These are the old-style (BSD) PTY devices; Unix98 devices are on major
-128 and above and use the PTY master multiplex ({\file /dev/ptmx}) to
-acquire a PTY on demand.
-
-\begin{devicelist}
-\major{}{}{block}{Floppy disks}
-	\minor{0}{/dev/fd0}{Controller 1, drive 1 autodetect}
-	\minor{1}{/dev/fd1}{Controller 1, drive 2 autodetect}
-	\minor{2}{/dev/fd2}{Controller 1, drive 3 autodetect}
-	\minor{3}{/dev/fd3}{Controller 1, drive 4 autodetect}
-	\minor{128}{/dev/fd4}{Controller 2, drive 1 autodetect}
-	\minor{129}{/dev/fd5}{Controller 2, drive 2 autodetect}
-	\minor{130}{/dev/fd6}{Controller 2, drive 3 autodetect}
-	\minor{131}{/dev/fd7}{Controller 2, drive 4 autodetect}
-\\
-\major{}{}{}{To specify format, add to the autodetect device number}
-	\minor{  0}{/dev/fd?}{Autodetect format}
-	\minor{}{}{}
-	\minor{  4}{/dev/fd?d360}{5.25\tum\ \num{4}{360}K in a \num{4}{360}K drive\1}
-	\minor{ 20}{/dev/fd?h360}{5.25\tum\ \num{4}{360}K in a 1200K drive\1}
-	\minor{ 48}{/dev/fd?h410}{5.25\tum\ \num{4}{410}K in a 1200K drive}
-	\minor{ 64}{/dev/fd?h420}{5.25\tum\ \num{4}{420}K in a 1200K drive}
-	\minor{ 24}{/dev/fd?h720}{5.25\tum\ \num{4}{720}K in a 1200K drive}
-	\minor{ 80}{/dev/fd?h880}{5.25\tum\ \num{4}{880}K in a 1200K drive\1}
-	\minor{  8}{/dev/fd?h1200}{5.25\tum\ 1200K in a 1200K drive\1}
-	\minor{ 40}{/dev/fd?h1440}{5.25\tum\ 1440K in a 1200K drive\1}
-	\minor{ 56}{/dev/fd?h1476}{5.25\tum\ 1476K in a 1200K drive}
-	\minor{ 72}{/dev/fd?h1494}{5.25\tum\ 1494K in a 1200K drive}
-	\minor{ 92}{/dev/fd?h1600}{5.25\tum\ 1600K in a 1200K drive\1}
-	\minor{}{}{}
-	\minor{ 12}{/dev/fd?u360}{3.5\tum\ \num{4}{360}K Double Density\2}
-	\minor{ 16}{/dev/fd?u720}{3.5\tum\ \num{4}{720}K Double Density\1}
-	\minor{120}{/dev/fd?u800}{3.5\tum\ \num{4}{800}K Double Density\2}
-	\minor{ 52}{/dev/fd?u820}{3.5\tum\ \num{4}{820}K Double Density}
-	\minor{ 68}{/dev/fd?u830}{3.5\tum\ \num{4}{830}K Double Density}
-	\minor{ 84}{/dev/fd?u1040}{3.5\tum\ 1040K Double Density\1}
-	\minor{ 88}{/dev/fd?u1120}{3.5\tum\ 1120K Double Density\1}
-	\minor{ 28}{/dev/fd?u1440}{3.5\tum\ 1440K High Density\1}
-	\minor{124}{/dev/fd?u1600}{3.5\tum\ 1600K High Density\1}
-	\minor{ 44}{/dev/fd?u1680}{3.5\tum\ 1680K High Density\3}
-	\minor{ 60}{/dev/fd?u1722}{3.5\tum\ 1722K High Density}
-	\minor{ 76}{/dev/fd?u1743}{3.5\tum\ 1743K High Density}
-	\minor{ 96}{/dev/fd?u1760}{3.5\tum\ 1760K High Density}
-	\minor{116}{/dev/fd?u1840}{3.5\tum\ 1840K High Density\3}
-	\minor{100}{/dev/fd?u1920}{3.5\tum\ 1920K High Density\1}
-	\minor{ 32}{/dev/fd?u2880}{3.5\tum\ 2880K Extra Density\1}
-	\minor{104}{/dev/fd?u3200}{3.5\tum\ 3200K Extra Density}
-	\minor{108}{/dev/fd?u3520}{3.5\tum\ 3520K Extra Density}
-	\minor{112}{/dev/fd?u3840}{3.5\tum\ 3840K Extra Density\1}
-	\minor{}{}{}
-	\minor{36}{/dev/fd?CompaQ}{Compaq 2880K drive; probably obsolete}
-\\
-\major{}{}{}{\1 Autodetectable format}
-\major{}{}{}{\2 Autodetectable format in a Double Density (720K) drive only}
-\major{}{}{}{\3 Autodetectable format in a High Density (1440K) drive only}
-\end{devicelist}
-
-NOTE: The letter in the device name ({\file d}, {\file q}, {\file h}
-or {\file u}) signifies the type of drive supported: 5.25\tum\ Double
-Density ({\file d}), 5.25\tum\ Quad Density ({\file q}), 5.25\tum\
-High Density ({\file h}) or 3.5\tum\ (any type, {\file u}).  The
-capital letters {\file D}, {\file H}, or {\file E} for the 3.5\tum\
-models have been deprecated, since the drive type is insignificant for
-these devices.
-
-\begin{devicelist}
-\major{ 3}{}{char}{Pseudo-TTY slaves}
-	\minor{0}{/dev/ttyp0}{First PTY slave}
-	\minor{1}{/dev/ttyp1}{Second PTY slave}
-	\minordots
-	\minor{255}{/dev/ttyef}{256th PTY slave}
-\end{devicelist}
-
-\noindent
-These are the old-style (BSD) PTY devices; Unix98 devices are on major
-136 and above.
-
-\begin{devicelist}
-\major{}{}{block}{First MFM, RLL and IDE hard disk/CD-ROM interface}
-	\minor{0}{/dev/hda}{Master: whole disk (or CD-ROM)}
-	\minor{64}{/dev/hdb}{Slave: whole disk (or CD-ROM)}
-\\
-\major{}{}{}{For partitions, add to the whole disk device number}
-	\minor{0}{/dev/hd?}{Whole disk}
-	\minor{1}{/dev/hd?1}{First partition}
-	\minor{2}{/dev/hd?2}{Second partition}
-	\minordots
-	\minor{63}{/dev/hd?63}{63rd partition}
-\end{devicelist}
-
-\noindent
-For MS-DOS style partition tables (typically used by Linux/i386 and
-sometimes on Linux/Alpha), partitions 1-4 are the primary partitions,
-partitions 5 and up are logical partitions.  For other partitioning
-schemes, the meaning of the numbers vary.
-
-\begin{devicelist}
-\major{ 4}{}{char }{TTY devices}
-	\minor{0}{/dev/tty0}{Current virtual console}
-	\minor{1}{/dev/tty1}{First virtual console}
-	\minordots
-	\minor{63}{/dev/tty63}{63rd virtual console}
-	\minor{64}{/dev/ttyS0}{First serial port}
-	\minordots
-	\minor{127}{/dev/ttyS63}{64th serial port}
-	\minor{128}{/dev/ptyp0}{OBSOLETE}
-	\minordots
-	\minor{191}{/dev/ptysf}{OBSOLETE}
-	\minor{192}{/dev/ttyp0}{OBSOLETE}
-	\minordots
-	\minor{255}{/dev/ttysf}{OBSOLETE}
-\end{devicelist}
-
-\noindent
-Older versions of the Linux kernel used this major number for BSD PTY
-devices.  As of Linux 2.1.115, this is no longer supported.  Use major
-numbers 2 and 3.
-
-\begin{devicelist}
-\major{ 5}{}{char }{Alternate TTY devices}
-	\minor{0}{/dev/tty}{Current TTY device}
-	\minor{1}{/dev/console}{System console}
-	\minor{2}{/dev/ptmx}{PTY master multiplex}
-	\minor{64}{/dev/cua0}{Callout device corresponding to {\file ttyS0}}
-	\minordots
-	\minor{127}{/dev/cua63}{Callout device corresponding to {\file ttyS63}}
-\end{devicelist}
-
-\noindent
-(5,1) is {\file /dev/console} starting with Linux 2.1.71.  See the
-section on terminal devices for more information on {\file /dev/console}.
-
-\begin{devicelist}
-\major{ 6}{}{char }{Parallel printer devices}
-	\minor{0}{/dev/lp0}{First parallel printer ({\hex 0x3bc})}
-	\minor{1}{/dev/lp1}{Second parallel printer ({\hex 0x378})}
-	\minor{2}{/dev/lp2}{Third parallel printer ({\hex 0x278})}
-\end{devicelist}
-
-\noindent
-Not all computers have the {\hex 0x3bc} parallel port, hence the
-"first" printer may be either {\file /dev/lp0} or {\file /dev/lp1}.
-
-\begin{devicelist}
-\major{ 7}{}{char }{Virtual console access devices}
-	\minor{0}{/dev/vcs}{Current vc text access}
-	\minor{1}{/dev/vcs1}{tty1 text access}
-	\minordots
-	\minor{63}{/dev/vcs63}{tty63 text access}
-	\minor{128}{/dev/vcsa}{Current vc text/attribute access}
-	\minor{129}{/dev/vcsa1}{tty1 text/attribute access}
-	\minordots
-	\minor{191}{/dev/vcsa63}{tty63 text/attribute access}
-\end{devicelist}
-
-\noindent
-NOTE: These devices permit both read and write access.
-
-\begin{devicelist}
-\major{  }{}{block}{Loopback devices}
-	\minor{0}{/dev/loop0}{First loopback device}
-	\minor{1}{/dev/loop1}{Second loopback device}
-	\minordots
-\end{devicelist}
-
-\noindent
-The loopback devices are used to mount filesystems not associated with
-block devices.  The binding to the loopback devices is handled by
-{\bf mount}(8) or {\bf losetup}(8).
-
-\begin{devicelist}
-\major{ 8}{}{block}{SCSI disk devices (0-15)}
-	\minor{0}{/dev/sda}{First SCSI disk whole disk}
-	\minor{16}{/dev/sdb}{Second SCSI disk whole disk}
-	\minor{32}{/dev/sdc}{Third SCSI disk whole disk}
-	\minordots
-	\minor{240}{/dev/sdp}{Sixteenth SCSI disk whole disk}
-\end{devicelist}
-
-\noindent
-Partitions are handled in the same way as for IDE disks (see major
-number 3) except that the partition limit is 15 rather than 63 per
-disk.
-
-\begin{devicelist}
-\major{ 9}{}{char }{SCSI tape devices}
-	\minor{0}{/dev/st0}{First SCSI tape, mode 0}
-	\minor{1}{/dev/st1}{Second SCSI tape, mode 0}
-	\minordots
-	\minor{32}{/dev/st0l}{First SCSI tape, mode 1}
-	\minor{33}{/dev/st1l}{Second SCSI tape, mode 1}
-	\minordots
-	\minor{64}{/dev/st0m}{First SCSI tape, mode 2}
-	\minor{65}{/dev/st1m}{Second SCSI tape, mode 2}
-	\minordots
-	\minor{96}{/dev/st0a}{First SCSI tape, mode 3}
-	\minor{97}{/dev/st1a}{Second SCSI tape, mode 4}
-	\minordots
-	\minor{128}{/dev/nst0}{First SCSI tape, mode 0, no rewind}
-	\minor{129}{/dev/nst1}{Second SCSI tape, mode 0, no rewind}
-	\minordots
-	\minor{160}{/dev/nst0l}{First SCSI tape, mode 1, no rewind}
-	\minor{161}{/dev/nst1l}{Second SCSI tape, mode 1, no rewind}
-	\minordots
-	\minor{192}{/dev/nst0m}{First SCSI tape, mode 2, no rewind}
-	\minor{193}{/dev/nst1m}{Second SCSI tape, mode 2, no rewind}
-	\minordots
-	\minor{224}{/dev/nst0a}{First SCSI tape, mode 3, no rewind}
-	\minor{225}{/dev/nst1a}{Second SCSI tape, mode 3, no rewind}
-	\minordots
-\end{devicelist}
-
-\noindent
-``No rewind'' refers to the omission of the default automatic rewind
-on device close.  The {\file MTREW} or {\file MTOFFL} ioctl()s can be
-used to rewind the tape regardless of the device used to access it.
-
-\begin{devicelist}
-\major{  }{}{block}{Metadisk (RAID) devices}
-	\minor{0}{/dev/md0}{First metadisk group}
-	\minor{1}{/dev/md1}{Second metadisk group}
-	\minordots
-\end{devicelist}
-
-\noindent
-The metadisk driver is used to span a filesystem across multiple
-physical disks.
-
-\begin{devicelist}
-\major{10}{}{char }{Non-serial mice, misc features}
-	\minor{0}{/dev/logibm}{Logitech bus mouse}
-	\minor{1}{/dev/psaux}{PS/2-style mouse port}
-	\minor{2}{/dev/inportbm}{Microsoft Inport bus mouse}
-	\minor{3}{/dev/atibm}{ATI XL bus mouse}
-	\minor{4}{/dev/jbm}{J-mouse}
-	\minor{4}{/dev/amigamouse}{Amiga mouse (68k/Amiga)}
-	\minor{5}{/dev/atarimouse}{Atari mouse}
-	\minor{6}{/dev/sunmouse}{Sun mouse}
-	\minor{7}{/dev/amigamouse1}{Second Amiga mouse}
-	\minor{8}{/dev/smouse}{Simple serial mouse driver}
-	\minor{9}{/dev/pc110pad}{IBM PC-110 digitizer pad}
-	\minor{128}{/dev/beep}{Fancy beep device}
-	\minor{129}{/dev/modreq}{Kernel module load request}
-	\minor{130}{/dev/watchdog}{Watchdog timer port}
-	\minor{131}{/dev/temperature}{Machine internal temperature}
-	\minor{132}{/dev/hwtrap}{Hardware fault trap}
-	\minor{133}{/dev/exttrp}{External device trap}
-	\minor{134}{/dev/apm\_bios}{Advanced Power Management BIOS}
-	\minor{135}{/dev/rtc}{Real Time Clock}
-	\minor{139}{/dev/openprom}{SPARC OpenBoot PROM}
-	\minor{140}{/dev/relay8}{Berkshire Products Octal relay card}
-	\minor{141}{/dev/relay16}{Berkshire Products ISO-16 relay card}
-	\minor{142}{/dev/msr}{x86 model specific registers}
-	\minor{143}{/dev/pciconf}{PCI configuration space}
-	\minor{144}{/dev/nvram}{Non-volatile configuration RAM}
-	\minor{145}{/dev/hfmodem}{Soundcard shortwave modem control}
-	\minor{146}{/dev/graphics}{Linux/SGI graphics device}
-	\minor{147}{/dev/opengl}{Linux/SGI OpenGL pipe}
-	\minor{148}{/dev/gfx}{Linux/SGI graphics effects device}
-	\minor{149}{/dev/input/mouse}{Linux/SGI Irix emulation mouse}
-	\minor{150}{/dev/input/keyboard}{Linux/SGI Irix emulation keyboard}
-	\minor{151}{/dev/led}{Front panel LEDs}
-	\minor{153}{/dev/mergemem}{Memory merge device}
-	\minor{154}{/dev/pmu}{Macintosh PowerBook power manager}
-\end{devicelist}
-
-\begin{devicelist}
-\major{11}{}{char }{Raw keyboard device}
-	\minor{0}{/dev/kbd}{Raw keyboard device}
-\end{devicelist}
-
-\noindent
-The raw keyboard device is used on Linux/SPARC only.
-
-\begin{devicelist}
-\major{  }{}{block}{SCSI CD-ROM devices}
-	\minor{0}{/dev/sr0}{First SCSI CD-ROM}
-	\minor{1}{/dev/sr1}{Second SCSI CD-ROM}
-	\minordots
-\end{devicelist}
-
-\noindent
-The prefix {\file /dev/scd} instead of {\file /dev/sr} has been used
-as well, and might make more sense.
-
-\begin{devicelist}
-\major{12}{}{char }{QIC-02 tape}
-	\minor{2}{/dev/ntpqic11}{QIC-11, no rewind-on-close}
-	\minor{3}{/dev/tpqic11}{QIC-11, rewind-on-close}
-	\minor{4}{/dev/ntpqic24}{QIC-24, no rewind-on-close}
-	\minor{5}{/dev/tpqic24}{QIC-24, rewind-on-close}
-	\minor{6}{/dev/ntpqic120}{QIC-120, no rewind-on-close}
-	\minor{7}{/dev/tpqic120}{QIC-120, rewind-on-close}
-	\minor{8}{/dev/ntpqic150}{QIC-150, no rewind-on-close}
-	\minor{9}{/dev/tpqic150}{QIC-150, rewind-on-close}
-\end{devicelist}
-
-\noindent
-The device names specified are proposed -- if there are ``standard''
-names for these devices, please let me know.
-
-\begin{devicelist}
-\major{  }{}{block}{MSCDEX CD-ROM callback support}
-	\minor{0}{/dev/dos\_cd0}{First MSCDEX CD-ROM}
-	\minor{1}{/dev/dos\_cd1}{Second MSCDEX CD-ROM}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{13}{}{char }{PC speaker}
-	\minor{0}{/dev/pcmixer}{Emulates {\file /dev/mixer}}
-	\minor{3}{/dev/pcsp}{Emulates {\file /dev/dsp} (8-bit)}
-	\minor{4}{/dev/pcaudio}{Emulates {\file /dev/audio}}
-	\minor{5}{/dev/pcsp16}{Emulates {\file /dev/dsp} (16-bit)}
-\\
-\major{  }{}{block}{8-bit MFM/RLL/IDE controller}
-	\minor{0}{/dev/xda}{First XT disk whole disk}
-	\minor{64}{/dev/xdb}{Second XT disk whole disk}
-\end{devicelist}
-
-\noindent
-Partitions are handled in the same way as for IDE disks (see major
-number 3).
-
-\begin{devicelist}
-\major{14}{}{char }{Sound card}
-	\minor{0}{/dev/mixer}{Mixer control}
-	\minor{1}{/dev/sequencer}{Audio sequencer}
-	\minor{2}{/dev/midi00}{First MIDI port}
-	\minor{3}{/dev/dsp}{Digital audio}
-	\minor{4}{/dev/audio}{Sun-compatible digital audio}
-	\minor{6}{/dev/sndstat}{Sound card status information}
-	\minor{8}{/dev/sequencer2}{Sequencer -- alternate device}
-	\minor{16}{/dev/mixer1}{Second soundcard mixer control}
-	\minor{17}{/dev/patmgr0}{Sequencer patch manager}
-	\minor{18}{/dev/midi01}{Second MIDI port}
-	\minor{19}{/dev/dsp1}{Second soundcard digital audio}
-	\minor{20}{/dev/audio1}{Second soundcard Sun digital audio}
-	\minor{33}{/dev/patmgr1}{Sequencer patch manager}
-	\minor{34}{/dev/midi02}{Third MIDI port}
-	\minor{50}{/dev/midi03}{Fourth MIDI port}
-\\
-\major{  }{}{block}{BIOS harddrive callback support}
-	\minor{0}{/dev/dos\_hda}{First BIOS harddrive whole disk}
-	\minor{64}{/dev/dos\_hdb}{Second BIOS harddrive whole disk}
-	\minor{128}{/dev/dos\_hdc}{Third BIOS harddrive whole disk}
-	\minor{192}{/dev/dos\_hdd}{Fourth BIOS harddrive whole disk}
-\end{devicelist}
-
-\noindent
-Partitions are handled in the same way as for IDE disks (see major
-number 3).
-
-\begin{devicelist}
-\major{15}{}{char }{Joystick}
-	\minor{0}{/dev/js0}{First analog joystick}
-	\minor{1}{/dev/js1}{Second analog joystick}
-	\minordots
-	\minor{128}{/dev/djs0}{First digital joystick}
-	\minor{129}{/dev/djs1}{Second digital joystick}
-	\minordots
-\\
-\major{  }{}{block}{Sony CDU-31A/CDU-33A CD-ROM}
-	\minor{0}{/dev/sonycd}{Sony CDU-31A CD-ROM}
-\end{devicelist}
-
-\begin{devicelist}
-\major{16}{}{char }{Non-SCSI scanners}
-	\minor{0}{/dev/gs4500}{Genius 4500 handheld scanner}
-\\
-\major{  }{}{block}{GoldStar CD-ROM}
-	\minor{0}{/dev/gscd}{GoldStar CD-ROM}
-\end{devicelist}
-
-\begin{devicelist}
-\major{17}{}{char }{Chase serial card}
-	\minor{0}{/dev/ttyH0}{First Chase port}
-	\minor{1}{/dev/ttyH1}{Second Chase port}
-	\minordots
-\\
-\major{  }{}{block}{Optics Storage CD-ROM}
-	\minor{0}{/dev/optcd}{Optics Storage CD-ROM}
-\end{devicelist}
-
-\begin{devicelist}
-\major{18}{}{char }{Chase serial card -- alternate devices}
-	\minor{0}{/dev/cuh0}{Callout device corresponding to {\file ttyH0}}
-	\minor{1}{/dev/cuh1}{Callout device corresponding to {\file ttyH1}}
-	\minordots
-\\
-\major{  }{}{block}{Sanyo CD-ROM}
-	\minor{0}{/dev/sjcd}{Sanyo CD-ROM}
-\end{devicelist}
-
-\begin{devicelist}
-\major{19}{}{char }{Cyclades serial card}
-	\minor{0}{/dev/ttyC0}{First Cyclades port}
-	\minordots
-	\minor{31}{/dev/ttyC31}{32nd Cyclades port}
-\\
-\major{  }{}{block}{``Double'' compressed disk}
-	\minor{0}{/dev/double0}{First compressed disk}
-	\minordots
-	\minor{7}{/dev/double7}{Eighth compressed disk}
-	\minor{128}{/dev/cdouble0}{Mirror of first compressed disk}
-	\minordots
-	\minor{135}{/dev/cdouble7}{Mirror of eighth compressed disk}
-\end{devicelist}
-
-\noindent
-See the Double documentation for an explanation of the ``mirror'' devices.
-
-\begin{devicelist}
-\major{20}{}{char }{Cyclades serial card -- alternate devices}
-	\minor{0}{/dev/cub0}{Callout device corresponding to {\file ttyC0}}
-	\minordots
-	\minor{31}{/dev/cub31}{Callout device corresponding to {\file ttyC31}}
-\\
-\major{  }{}{block}{Hitachi CD-ROM}
-	\minor{0}{/dev/hitcd}{Hitachi CD-ROM}
-\end{devicelist}
-
-\begin{devicelist}
-\major{21}{}{char }{Generic SCSI access}
-	\minor{0}{/dev/sg0}{First generic SCSI device}
-	\minor{1}{/dev/sg1}{Second generic SCSI device}
-	\minordots
-\end{devicelist}
-
-\noindent
-Most distributions name these {\file /dev/sga}, {\file /dev/sgb}...
-This sets an unneccesary limit of 26 SCSI devices in the system, and
-is counter to standard Linux device-naming practice.
-
-\begin{devicelist}
-\major{  }{}{block }{Acorn MFM hard drive interface}
-	\minor{0}{/dev/mfma}{First MFM drive whole disk}
-	\minor{64}{/dev/mfmb}{Second MFM drive whole disk}
-\end{devicelist}
-
-\noindent
-This device is used on the ARM-based Acorn RiscPC.  Partitions are
-handled the same way as for IDE disks (see major number 3).
-
-\begin{devicelist}
-\major{22}{}{char }{Digiboard serial card}
-	\minor{0}{/dev/ttyD0}{First Digiboard port}
-	\minor{1}{/dev/ttyD1}{Second Digiboard port}
-	\minordots
-\\
-\major{  }{}{block}{Second IDE hard disk/CD-ROM interface}
-	\minor{0}{/dev/hdc}{Master: whole disk (or CD-ROM)}
-	\minor{64}{/dev/hdd}{Slave: whole disk (or CD-ROM)}
-\end{devicelist}
-
-\noindent
-Partitions are handled the same way as for the first interface (see
-major number 3).
-
-\begin{devicelist}
-\major{23}{}{char }{Digiboard serial card -- alternate devices}
-	\minor{0}{/dev/cud0}{Callout device corresponding to {\file ttyD0}}
-	\minor{1}{/dev/cud1}{Callout device corresponding to {\file ttyD1}}
-	\minordots
-\major{  }{}{block}{Mitsumi proprietary CD-ROM}
-	\minor{0}{/dev/mcd}{Mitsumi CD-ROM}
-\end{devicelist}
-
-\begin{devicelist}\
-\major{24}{}{char }{Stallion serial card}
-	\minor{0}{/dev/ttyE0}{Stallion port 0 board 0}
-	\minor{1}{/dev/ttyE1}{Stallion port 1 board 0}
-	\minordots
-	\minor{64}{/dev/ttyE64}{Stallion port 0 board 1}
-	\minor{65}{/dev/ttyE65}{Stallion port 1 board 1}
-	\minordots
-	\minor{128}{/dev/ttyE128}{Stallion port 0 board 2}
-	\minor{129}{/dev/ttyE129}{Stallion port 1 board 2}
-	\minordots
-	\minor{192}{/dev/ttyE192}{Stallion port 0 board 3}
-	\minor{193}{/dev/ttyE193}{Stallion port 1 board 3}
-	\minordots
-\\
-\major{  }{}{block}{Sony CDU-535 CD-ROM}
-	\minor{0}{/dev/cdu535}{Sony CDU-535 CD-ROM}
-\end{devicelist}
-
-\begin{devicelist}
-\major{25}{}{char }{Stallion serial card -- alternate devices}
-	\minor{0}{/dev/cue0}{Callout device corresponding to {\file ttyE0}}
-	\minor{1}{/dev/cue1}{Callout device corresponding to {\file ttyE1}}
-	\minordots
-	\minor{64}{/dev/cue64}{Callout device corresponding to {\file ttyE64}}
-	\minor{65}{/dev/cue65}{Callout device corresponding to {\file ttyE65}}
-	\minordots
-	\minor{128}{/dev/cue128}{Callout device corresponding to {\file ttyE128}}
-	\minor{129}{/dev/cue129}{Callout device corresponding to {\file ttyE129}}
-	\minordots
-	\minor{192}{/dev/cue192}{Callout device corresponding to {\file ttyE192}}
-	\minor{193}{/dev/cue193}{Callout device corresponding to {\file ttyE193}}
-	\minordots
-\\
-\major{  }{}{block}{First Matsushita (Panasonic/SoundBlaster) CD-ROM}
-	\minor{0}{/dev/sbpcd0}{Panasonic CD-ROM controller 0 unit 0}
-	\minor{1}{/dev/sbpcd1}{Panasonic CD-ROM controller 0 unit 1}
-	\minor{2}{/dev/sbpcd2}{Panasonic CD-ROM controller 0 unit 2}
-	\minor{3}{/dev/sbpcd3}{Panasonic CD-ROM controller 0 unit 3}
-\end{devicelist}
-
-\begin{devicelist}
-\major{26}{}{char }{Quanta WinVision frame grabber}
-	\minor{0}{/dev/wvisfgrab}{Quanta WinVision frame grabber}
-\\
-\major{  }{}{block}{Second Matsushita (Panasonic/SoundBlaster) CD-ROM}
-	\minor{0}{/dev/sbpcd4}{Panasonic CD-ROM controller 1 unit 0}
-	\minor{1}{/dev/sbpcd5}{Panasonic CD-ROM controller 1 unit 1}
-	\minor{2}{/dev/sbpcd6}{Panasonic CD-ROM controller 1 unit 2}
-	\minor{3}{/dev/sbpcd7}{Panasonic CD-ROM controller 1 unit 3}
-\end{devicelist}
-
-\begin{devicelist}
-\major{27}{}{char }{QIC-117 tape}
-	\minor{0}{/dev/qft0}{Unit 0, rewind-on-close}
-	\minor{1}{/dev/qft1}{Unit 1, rewind-on-close}
-	\minor{2}{/dev/qft2}{Unit 2, rewind-on-close}
-	\minor{3}{/dev/qft3}{Unit 3, rewind-on-close}
-	\minor{4}{/dev/nqft0}{Unit 0, no rewind-on-close}
-	\minor{5}{/dev/nqft1}{Unit 1, no rewind-on-close}
-	\minor{6}{/dev/nqft2}{Unit 2, no rewind-on-close}
-	\minor{7}{/dev/nqft3}{Unit 3, no rewind-on-close}
-	\minor{16}{/dev/zqft0}{Unit 0, rewind-on-close, compression}
-	\minor{17}{/dev/zqft1}{Unit 1, rewind-on-close, compression}
-	\minor{18}{/dev/zqft2}{Unit 2, rewind-on-close, compression}
-	\minor{19}{/dev/zqft3}{Unit 3, rewind-on-close, compression}
-	\minor{20}{/dev/nzqft0}{Unit 0, no rewind-on-close, compression}
-	\minor{21}{/dev/nzqft1}{Unit 1, no rewind-on-close, compression}
-	\minor{22}{/dev/nzqft2}{Unit 2, no rewind-on-close, compression}
-	\minor{23}{/dev/nzqft3}{Unit 3, no rewind-on-close, compression}
-	\minor{32}{/dev/rawqft0}{Unit 0, rewind-on-close, no file marks}
-	\minor{33}{/dev/rawqft1}{Unit 1, rewind-on-close, no file marks}
-	\minor{34}{/dev/rawqft2}{Unit 2, rewind-on-close, no file marks}
-	\minor{35}{/dev/rawqft3}{Unit 3, rewind-on-close, no file marks}
-	\minor{36}{/dev/nrawqft0}{Unit 0, no rewind-on-close, no file marks}
-	\minor{37}{/dev/nrawqft1}{Unit 1, no rewind-on-close, no file marks}
-	\minor{38}{/dev/nrawqft2}{Unit 2, no rewind-on-close, no file marks}
-	\minor{39}{/dev/nrawqft3}{Unit 3, no rewind-on-close, no file marks}
-\\
-\major{  }{}{block}{Third Matsushita (Panasonic/SoundBlaster) CD-ROM}
-	\minor{0}{/dev/sbpcd8}{Panasonic CD-ROM controller 2 unit 0}
-	\minor{1}{/dev/sbpcd9}{Panasonic CD-ROM controller 2 unit 1}
-	\minor{2}{/dev/sbpcd10}{Panasonic CD-ROM controller 2 unit 2}
-	\minor{3}{/dev/sbpcd11}{Panasonic CD-ROM controller 2 unit 3}
-\end{devicelist}
-
-\begin{devicelist}
-\major{28}{}{char }{Stallion serial card -- card programming}
-	\minor{0}{/dev/staliomem0}{First Stallion I/O card memory}
-	\minor{1}{/dev/staliomem1}{Second Stallion I/O card memory}
-	\minor{2}{/dev/staliomem2}{Third Stallion I/O card memory}
-	\minor{3}{/dev/staliomem3}{Fourth Stallion I/O card memory}
-\\
-\major{  }{}{char }{Atari SLM ACSI laser printer (68k/Atari)}
-	\minor{0}{/dev/slm0}{First SLM laser printer}
-	\minor{1}{/dev/slm1}{Second SLM laser printer}
-	\minordots
-\\
-\major{  }{}{block}{Fourth Matsushita (Panasonic/SoundBlaster) CD-ROM}
-	\minor{0}{/dev/sbpcd12}{Panasonic CD-ROM controller 3 unit 0}
-	\minor{1}{/dev/sbpcd13}{Panasonic CD-ROM controller 3 unit 1}
-	\minor{2}{/dev/sbpcd14}{Panasonic CD-ROM controller 3 unit 2}
-	\minor{3}{/dev/sbpcd15}{Panasonic CD-ROM controller 3 unit 3}
-\\
-\major{  }{}{block}{ACSI disk/CD-ROM (68k/Atari)}
-	\minor{0}{/dev/ada}{First ACSI disk whole disk}
-	\minor{16}{/dev/adb}{Second ACSI disk whole disk}
-	\minor{32}{/dev/adc}{Third ACSI disk whole disk}
-	\minordots
-	\minor{240}{/dev/adp}{Sixteenth ACSI disk whole disk}
-\end{devicelist}
-
-\noindent
-Partitions are handled in the same way as for IDE disks (see major
-number 3) except that the partition limit is 15 rather than 63 per
-disk (same as SCSI.)
-
-\begin{devicelist}
-\major{29}{}{char }{Universal frame buffer}
-	\minor{0}{/dev/fb0}{First frame buffer}
-	\minor{32}{/dev/fb1}{Second frame buffer}
-	\minor{64}{/dev/fb2}{Third frame buffer}
-	\minordots
-	\minor{224}{/dev/fb7}{Eighth frame buffer}
-\end{devicelist}
-
-\noindent
-All additional minor device numbers are reserved.
-
-\begin{devicelist}
-\major{  }{}{block}{Aztech/Orchid/Okano/Wearnes CD-ROM}
-	\minor{0}{/dev/aztcd}{Aztech CD-ROM}
-\end{devicelist}
-
-\begin{devicelist}
-\major{30}{}{char }{iBCS-2 compatibility devices}
-	\minor{0}{/dev/socksys}{Socket access}
-	\minor{1}{/dev/spx}{SVR3 local X interface}
-	\minor{2}{/dev/inet/arp}{Network access}
-	\minor{2}{/dev/inet/icmp}{Network access}
-	\minor{2}{/dev/inet/ip}{Network access}
-	\minor{2}{/dev/inet/udp}{Network access}
-	\minor{2}{/dev/inet/tcp}{Network access}
-\end{devicelist}
-
-\noindent
-Additionally, iBCS-2 requires {\file /dev/nfsd} to be a link to {\file
-/dev/socksys} and {\file /dev/X0R} to be a link to {\file /dev/null}.
-
-\begin{devicelist}
-\major{  }{}{block}{Philips LMS CM-205 CD-ROM}
-	\minor{0}{/dev/cm205cd}{Philips LMS CM-205 CD-ROM}
-\end{devicelist}
-
-\noindent
-{\file /dev/lmscd} is an older name for this drive.  This driver does
-not work with the CM-205MS CD-ROM.
-
-\begin{devicelist}
-\major{31}{}{char }{MPU-401 MIDI}
-	\minor{0}{/dev/mpu401data}{MPU-401 data port}
-	\minor{1}{/dev/mpu401stat}{MPU-401 status port}
-\\
-\major{  }{}{block}{ROM/flash memory card}
-	\minor{0}{/dev/rom0}{First ROM card (rw)}
-	\minordots
-	\minor{7}{/dev/rom7}{Eighth ROM card (rw)}
-	\minor{8}{/dev/rrom0}{First ROM card (ro)}
-	\minordots
-	\minor{15}{/dev/rrom0}{Eighth ROM card (ro)}
-	\minor{16}{/dev/flash0}{First flash memory card (rw)}
-	\minordots
-	\minor{23}{/dev/flash7}{Eighth flash memory card (rw)}
-	\minor{24}{/dev/rflash0}{First flash memory card (ro)}
-	\minordots
-	\minor{31}{/dev/rflash7}{Eighth flash memory card (ro)}
-\end{devicelist}
-
-\noindent
-The read-write (rw) devices support back-caching written data in RAM,
-as well as writing to flash RAM devices.  The read-only devices (ro)
-support reading only.
-
-\begin{devicelist}
-\major{32}{}{char }{Specialix serial card}
-	\minor{0}{/dev/ttyX0}{First Specialix port}
-	\minor{1}{/dev/ttyX1}{Second Specialix port}
-	\minordots
-\\
-\major{  }{}{block}{Philips LMS CM-206 CD-ROM}
-	\minor{0}{/dev/cm206cd}{Philips LMS CM-206 CD-ROM}
-\end{devicelist}
-
-\begin{devicelist}
-\major{33}{}{char }{Specialix serial card -- alternate devices}
-	\minor{0}{/dev/cux0}{Callout device corresponding to {\file ttyX0}}
-	\minor{1}{/dev/cux1}{Callout device corresponding to {\file ttyX1}}
-	\minordots
-\\
-\major{  }{}{block}{Third IDE hard disk/CD-ROM interface}
-	\minor{0}{/dev/hde}{Master: whole disk (or CD-ROM)}
-	\minor{64}{/dev/hdf}{Slave: whole disk (or CD-ROM)}
-\end{devicelist}
-
-\noindent
-Partitions are handled the same way as for the first interface (see
-major number 3).
-
-\begin{devicelist}
-\major{34}{}{char }{Z8530 HDLC driver}
-	\minor{0}{/dev/scc0}{First Z8530, first port}
-	\minor{1}{/dev/scc1}{First Z8530, second port}
-	\minor{2}{/dev/scc2}{Second Z8530, first port}
-	\minor{3}{/dev/scc3}{Second Z8530, second port}
-	\minordots
-\end{devicelist}
-
-\noindent
-In a previous version these devices were named {\file /dev/sc1} for
-{\file /dev/scc0}, {\file /dev/sc2} for {\file /dev/scc1}, and so on.
-
-\begin{devicelist}
-\major{  }{}{block}{Fourth IDE hard disk/CD-ROM interface}
-	\minor{0}{/dev/hdg}{Master: whole disk (or CD-ROM)}
-	\minor{64}{/dev/hdh}{Slave: whole disk (or CD-ROM)}
-\end{devicelist}
-
-\noindent
-Partitions are handled the same way as for the first interface (see
-major number 3).
-
-\begin{devicelist}
-\major{35}{}{char }{tclmidi MIDI driver}
-	\minor{0}{/dev/midi0}{First MIDI port, kernel timed}
-	\minor{1}{/dev/midi1}{Second MIDI port, kernel timed}
-	\minor{2}{/dev/midi2}{Third MIDI port, kernel timed}
-	\minor{3}{/dev/midi3}{Fourth MIDI port, kernel timed}
-	\minor{64}{/dev/rmidi0}{First MIDI port, untimed}
-	\minor{65}{/dev/rmidi1}{Second MIDI port, untimed}
-	\minor{66}{/dev/rmidi2}{Third MIDI port, untimed}
-	\minor{67}{/dev/rmidi3}{Fourth MIDI port, untimed}
-	\minor{128}{/dev/smpte0}{First MIDI port, SMPTE timed}
-	\minor{129}{/dev/smpte1}{Second MIDI port, SMPTE timed}
-	\minor{130}{/dev/smpte2}{Third MIDI port, SMPTE timed}
-	\minor{131}{/dev/smpte3}{Fourth MIDI port, SMPTE timed}
-\\
-\major{  }{}{block}{Slow memory ramdisk}
-	\minor{0}{/dev/slram}{Slow memory ramdisk}
-\end{devicelist}
-
-\begin{devicelist}
-\major{36}{}{char }{Netlink support}
-	\minor{0}{/dev/route}{Routing, device updates (kernel to user)}
-	\minor{1}{/dev/skip}{enSKIP security cache control}
-\\
-\major{  }{}{block}{MCA ESDI hard disk}
-	\minor{0}{/dev/eda}{First ESDI disk whole disk}
-	\minor{64}{/dev/edb}{Second ESDI disk whole disk}
-	\minordots
-\end{devicelist}
-
-\noindent
-Partitions are handled the same way as for IDE disks (see major number
-3).
-
-\begin{devicelist}
-\major{37}{}{char }{IDE tape}
-	\minor{0}{/dev/ht0}{First IDE tape}
-	\minor{128}{/dev/nht0}{First IDE tape, no rewind-on-close}
-\end{devicelist}
-
-\noindent
-Currently, only one IDE tape drive is supported.
-
-\begin{devicelist}
-\major{  }{}{block}{Zorro II ramdisk}
-	\minor{0}{/dev/z2ram}{Zorro II ramdisk}
-\end{devicelist}
-
-\begin{devicelist}
-\major{38}{}{char }{Myricom PCI Myrinet board}
-	\minor{0}{/dev/mlanai0}{First Myrinet board}
-	\minor{1}{/dev/mlanai1}{Second Myrinet board}
-	\minordots
-\end{devicelist}
-
-\noindent
-This device is used for board control, status query and ``user level
-packet I/O''.  The board is also accessible as a regular {\file eth}
-networking device.
-
-\begin{devicelist}
-\major{  }{}{block}{Reserved for Linux/AP+}
-\end{devicelist}
-
-\begin{devicelist}
-\major{39}{}{char }{ML-16P experimental I/O board}
-	\minor{0}{/dev/ml16pa-a0}{First card, first analog channel}
-	\minor{1}{/dev/ml16pa-a1}{First card, second analog channel}
-	\minordots
-	\minor{15}{/dev/ml16pa-a15}{First card, 16th analog channel}
-	\minor{16}{/dev/ml16pa-d}{First card, digital lines}
-	\minor{17}{/dev/ml16pa-c0}{First card, first counter/timer}
-	\minor{18}{/dev/ml16pa-c1}{First card, second counter/timer}
-	\minor{19}{/dev/ml16pa-c2}{First card, third counter/timer}
-	\minor{32}{/dev/ml16pb-a0}{Second card, first analog channel}
-	\minor{33}{/dev/ml16pb-a1}{Second card, second analog channel}
-	\minordots
-	\minor{47}{/dev/ml16pb-a15}{Second card, 16th analog channel}
-	\minor{48}{/dev/ml16pb-d}{Second card, digital lines}
-	\minor{49}{/dev/ml16pb-c0}{Second card, first counter/timer}
-	\minor{50}{/dev/ml16pb-c1}{Second card, second counter/timer}
-	\minor{51}{/dev/ml16pb-c2}{Second card, third counter/timer}
-	\minordots
-\\
-\major{  }{}{block}{Reserved for Linux/AP+}
-\end{devicelist}
-
-\begin{devicelist}
-\major{40}{}{char }{Matrox Meteor frame grabber}
-	\minor{0}{/dev/mmetfgrab}{Matrox Meteor frame grabber}
-\\
-\major{  }{}{block}{Syquest EZ135 parallel port removable drive}
-	\minor{0}{/dev/eza}{Parallel EZ135 drive whole disk}
-\end{devicelist}
-
-\noindent
-This device is obsolete and will be removed in a future version of
-Linux.  It has been replaced with the parallel port IDE disk driver at
-major number 45.  Partitions are handled the same way as for IDE disks
-(see major number 3).
-
-\begin{devicelist}
-\major{41}{}{char }{Yet Another Micro Monitor}
-	\minor{0}{/dev/yamm}{Yet Another Micro Monitor}
-\\
-\major{  }{}{block}{MicroSolutions BackPack parallel port CD-ROM}
-	\minor{0}{/dev/bpcd}{BackPack CD-ROM}
-\end{devicelist}
-
-\noindent
-This device is obsolete and will be removed in a future version of
-Linux.  It has been replaced with the parallel port ATAPI CD-ROM
-driver at major number 46.
-
-\begin{devicelist}
-\major{42}{}{}{Demo/sample use}
-\end{devicelist}
-
-\noindent
-This number is intended for use in sample code, as well as a general
-``example'' device number.  It should never be used for a device
-driver that is being distributed; either obtain an official number or
-use the local/experimental range.  The sudden addition or removal of a
-driver with this number should not cause ill effects to the system
-(bugs excepted.)
-
-IN PARTICULAR, ANY DISTRIBUTION WHICH CONTAINS A DEVICE DRIVER USING
-MAJOR NUMBER 42 IS NONCOMPLIANT.
-
-\begin{devicelist}
-\major{43}{}{char }{isdn4linux virtual modem}
-	\minor{0}{/dev/ttyI0}{First virtual modem}
-	\minordots
-	\minor{63}{/dev/ttyI63}{64th virtual modem}
-\\
-\major{  }{}{block}{Network block devices}
-	\minor{0}{/dev/nd0}{First network block device}
-	\minor{1}{/dev/nd1}{Second network block device}
-	\minordots
-\end{devicelist}
-
-\noindent
-Network Block Device is somehow similar to loopback devices: If you
-read from it, it sends packet accross network asking server for
-data. If you write to it, it sends packet telling server to write. It
-could be used to mounting filesystems over the net, swapping over the
-net, implementing block device in userland etc.
-
-\begin{devicelist}
-\major{44}{}{char }{isdn4linux virtual modem -- alternate devices}
-	\minor{0}{/dev/cui0}{Callout device corresponding to {\file ttyI0}}
-	\minordots
-	\minor{63}{/dev/cui63}{Callout device corresponding to {\file ttyI63}}
-\\
-\major{  }{}{block}{Flash Translation Layer (FTL) filesystems}
-        \minor{0}{/dev/ftla}{FTL on first Memory Technology Device}
-        \minor{16}{/dev/ftlb}{FTL on second Memory Technology Device}
-        \minor{32}{/dev/ftlc}{FTL on third Memory Technology Device}
-        \minordots
-        \minor{240}{/dev/ftlp}{FTL on 16th Memory Technology Device}
-\end{devicelist}
-
-\noindent
-Partitions are handled in the same way as for IDE disks (see major
-number 3) expect that the partition limit is 15 rather than 63 per
-disk (same as SCSI.)
-
-\begin{devicelist}
-\major{45}{}{char }{isdn4linux ISDN BRI driver}
-	\minor{0}{/dev/isdn0}{First virtual B channel raw data}
-	\minordots
-	\minor{63}{/dev/isdn63}{64th virtual B channel raw data}
-	\minor{64}{/dev/isdnctrl0}{First channel control/debug}
-	\minordots
-	\minor{127}{/dev/isdnctrl63}{64th channel control/debug}
-	\minor{128}{/dev/ippp0}{First SyncPPP device}
-	\minordots
-	\minor{191}{/dev/ippp63}{64th SyncPPP device}
-	\minor{255}{/dev/isdninfo}{ISDN monitor interface}
-\\
-\major{  }{}{block}{Parallel port IDE disk devices}
-	\minor{0}{/dev/pda}{First parallel port IDE disk}
-	\minor{16}{/dev/pdb}{Second parallel port IDE disk}
-	\minor{32}{/dev/pdc}{Third parallel port IDE disk}
-	\minor{48}{/dev/pdd}{Fourth parallel port IDE disk}
-\end{devicelist}
-
-\noindent
-Partitions are handled in the same way as for IDE disks (see major
-number 3) except that the partition limit is 15 rather than 63 per
-disk.
-
-\begin{devicelist}
-\major{46}{}{char }{Comtrol Rocketport serial card}
-	\minor{0}{/dev/ttyR0}{First Rocketport port}
-	\minor{1}{/dev/ttyR1}{Second Rocketport port}
-	\minordots
-\\
-\major{  }{}{block}{Parallel port ATAPI CD-ROM devices}
-	\minor{0}{/dev/pcd0}{First parallel port ATAPI CD-ROM}
-	\minor{1}{/dev/pcd1}{Second parallel port ATAPI CD-ROM}
-	\minor{2}{/dev/pcd2}{Third parallel port ATAPI CD-ROM}
-	\minor{3}{/dev/pcd3}{Fourth parallel port ATAPI CD-ROM}
-\end{devicelist}
-
-\begin{devicelist}
-\major{47}{}{char }{Comtrol Rocketport serial card -- alternate devices}
-	\minor{0}{/dev/cur0}{Callout device corresponding to {\file ttyR0}}
-	\minor{1}{/dev/cur1}{Callout device corresponding to {\file ttyR1}}
-	\minordots
-\\
-\major{  }{}{block}{Parallel port ATAPI disk devices}
-	\minor{0}{/dev/pf0}{First parallel port ATAPI disk}
-	\minor{1}{/dev/pf1}{Second parallel port ATAPI disk}
-	\minor{2}{/dev/pf2}{Third parallel port ATAPI disk}
-	\minor{3}{/dev/pf3}{Fourth parallel port ATAPI disk}
-\end{devicelist}
-
-\noindent
-This driver is intended for floppy disks and similar devices and hence
-does not support partitioning.
-
-\begin{devicelist}
-\major{48}{}{char }{SDL RISCom serial card}
-	\minor{0}{/dev/ttyL0}{First RISCom port}
-	\minor{1}{/dev/ttyL1}{Second RISCom port}
-	\minordots
-\\
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\end{devicelist}
-
-\begin{devicelist}
-\major{49}{}{char }{SDL RISCom serial card -- alternate devices}
-	\minor{0}{/dev/cul0}{Callout device corresponding to {\file ttyL0}}
-	\minor{1}{/dev/cul1}{Callout device corresponding to {\file ttyL1}}
-	\minordots
-\\
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\end{devicelist}
-
-\begin{devicelist}
-\major{50}{}{char}{Reserved for GLINT}
-\\
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\end{devicelist}
-
-\begin{devicelist}
-\major{51}{}{char }{Baycom radio modem}
-	\minor{0}{/dev/bc0}{First Baycom radio modem}
-	\minor{1}{/dev/bc1}{Second Baycom radio modem}
-	\minordots
-\\
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\end{devicelist}
-
-\begin{devicelist}
-\major{52}{}{char }{Spellcaster DataComm/BRI ISDN card}
-	\minor{0}{/dev/dcbri0}{First DataComm card}
-	\minor{1}{/dev/dcbri1}{Second DataComm card}
-	\minor{2}{/dev/dcbri2}{Third DataComm card}
-	\minor{3}{/dev/dcbri3}{Fourth DataComm card}
-\\
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\end{devicelist}
-
-\begin{devicelist}
-\major{53}{}{char }{BDM interface for remote debugging MC683xx microcontrollers}
-	\minor{0}{/dev/pd\_bdm0}{PD BDM interface on {\file lp0}}
-	\minor{1}{/dev/pd\_bdm1}{PD BDM interface on {\file lp1}}
-	\minor{2}{/dev/pd\_bdm2}{PD BDM interface on {\file lp2}}
-	\minor{4}{/dev/icd\_bdm0}{ICD BDM interface on {\file lp0}}
-	\minor{5}{/dev/icd\_bdm1}{ICD BDM interface on {\file lp1}}
-	\minor{6}{/dev/icd\_bdm2}{ICD BDM interface on {\file lp2}}
-\end{devicelist}
-
-\noindent
-This device is used for the interfacing to the MC683xx
-microcontrollers via Background Debug Mode by use of a Parallel Port
-interface. PD is the Motorola Public Domain Interface and ICD is the
-commercial interface by P\&E.
-
-\begin{devicelist}
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\end{devicelist}
-
-\begin{devicelist}
-\major{54}{}{char }{Electrocardiognosis Holter serial card}
-	\minor{0}{/dev/holter0}{First Holter port}
-	\minor{1}{/dev/holter1}{Second Holter port}
-	\minor{2}{/dev/holter2}{Third Holter port}
-\end{devicelist}
-
-\noindent
-A custom serial card used by Electrocardiognosis SRL
-$<$mseritan@ottonel.pub.ro$>$ to transfer data from Holter 24-hour
-heart monitoring equipment.
-
-\begin{devicelist}
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\end{devicelist}
-
-\begin{devicelist}
-\major{55}{}{char }{DSP56001 digital signal processor}
-	\minor{0}{/dev/dsp56k}{First DSP56001}
-\\
-\major{  }{}{block}{Reserved for Mylex DAC960 PCI RAID Controller}
-\end{devicelist}
-
-\begin{devicelist}
-\major{56}{}{char }{Apple Desktop Bus}
-	\minor{0}{/dev/adb}{ADB bus control}
-\end{devicelist}
-
-\noindent
-Additional devices will be added to this number, all starting with
-{\file /dev/adb}.
-
-\begin{devicelist}
-\major{  }{}{block}{Fifth IDE hard disk/CD-ROM interface}
-	\minor{0}{/dev/hdi}{Master: whole disk (or CD-ROM)}
-	\minor{64}{/dev/hdj}{Slave: whole disk (or CD-ROM)}
-\end{devicelist}
-
-\noindent
-Partitions are handled the same way as for the first interface (see
-major number 3).
-
-\begin{devicelist}
-\major{57}{}{char }{Hayes ESP serial card}
-	\minor{0}{/dev/ttyP0}{First ESP port}
-	\minor{1}{/dev/ttyP1}{Second ESP port}
-	\minordots
-\\
-\major{  }{}{block}{Sixth IDE hard disk/CD-ROM interface}
-	\minor{0}{/dev/hdk}{Master: whole disk (or CD-ROM)}
-	\minor{64}{/dev/hdl}{Slave: whole disk (or CD-ROM)}
-\end{devicelist}
-
-\noindent
-Partitions are handled the same way as for the first interface (see
-major number 3).
-
-\begin{devicelist}
-\major{58}{}{char }{Hayes ESP serial card -- alternate devices}
-	\minor{0}{/dev/cup0}{Callout device corresponding to {\file ttyP0}}
-	\minor{1}{/dev/cup1}{Callout device corresponding to {\file ttyP1}}
-	\minordots
-\\
-\major{  }{}{block}{Reserved for logical volume manager}
-\end{devicelist}
-
-\begin{devicelist}
-\major{59}{}{char }{sf firewall package}
-	\minor{0}{/dev/firewall}{Communication with sf kernel module}
-\end{devicelist}
-
-\begin{devicelist}
-\major{60}{--63}{}{Local/experimental use}
-\end{devicelist}
-
-\noindent
-For devices not assigned official numbers, these ranges should be
-used, in order to avoid conflict with future assignments.
-
-\begin{devicelist}
-\major{64}{}{char }{ENskip kernel encryption package}
-	\minor{0}{/dev/enskip}{Communication with ENskip kernel
-	module}
-\end{devicelist}
-
-\begin{devicelist}
-\major{65}{}{char }{Sundance ``plink'' Transputer boards}
-	\minor{0}{/dev/plink0}{First plink device}
-	\minor{1}{/dev/plink1}{Second plink device}
-	\minor{2}{/dev/plink2}{Third plink device}
-	\minor{3}{/dev/plink3}{Fourth plink device}
-	\minor{64}{/dev/rplink0}{First plink device, raw}
-	\minor{65}{/dev/rplink1}{Second plink device, raw}
-	\minor{66}{/dev/rplink2}{Third plink device, raw}
-	\minor{67}{/dev/rplink3}{Fourth plink device, raw}
-	\minor{128}{/dev/plink0d}{First plink device, debug}
-	\minor{129}{/dev/plink1d}{Second plink device, debug}
-	\minor{130}{/dev/plink2d}{Third plink device, debug}
-	\minor{131}{/dev/plink3d}{Fourth plink device, debug}
-	\minor{192}{/dev/rplink0d}{First plink device, raw, debug}
-	\minor{193}{/dev/rplink1d}{Second plink device, raw, debug}
-	\minor{194}{/dev/rplink2d}{Third plink device, raw, debug}
-	\minor{195}{/dev/rplink3d}{Fourth plink device, raw, debug}
-\end{devicelist}
-
-\noindent
-This is a commercial driver; contact James Howes
-$<$jth@prosig.demon.co.uk$>$ for information. 
-
-\begin{devicelist}
-\major{  }{}{block}{SCSI disk devices (16-31)}
-	\minor{0}{/dev/sdq}{17th SCSI disk whole disk}
-	\minor{16}{/dev/sdr}{18th SCSI disk whole disk}
-	\minor{32}{/dev/sds}{19th SCSI disk whole disk}
-	\minordots
-	\minor{240}{/dev/sdaf}{32nd SCSI disk whole disk}
-\end{devicelist}
-
-\noindent
-Partitions are handled in the same way as for IDE disks (see major
-number 3) except that the partition limit is 15 rather than 63 per
-disk.
-
-\begin{devicelist}
-\major{66}{}{char }{YARC PowerPC PCI coprocessor card}
-	\minor{0}{/dev/yppcpci0}{First YARC card}
-	\minor{1}{/dev/yppcpci1}{Second YARC card}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{  }{}{block}{SCSI disk devices (32-47)}
-	\minor{0}{/dev/sdag}{33rd SCSI disk whole disk}
-	\minor{16}{/dev/sdah}{34th SCSI disk whole disk}
-	\minor{32}{/dev/sdai}{35th SCSI disk whole disk}
-	\minordots
-	\minor{240}{/dev/sdav}{48th SCSI disk whole disk}
-\end{devicelist}
-
-\noindent
-Partitions are handled in the same way as for IDE disks (see major
-number 3) except that the partition limit is 15 rather than 63 per
-disk.
-
-\begin{devicelist}
-\major{67}{}{char }{Coda network filesystem}
-	\minor{0}{/dev/cfs0}{Coda cache manager}
-\end{devicelist}
-
-\noindent
-See {\url http://www.coda.cs.cmu.edu\/} for information about Coda.
-
-\begin{devicelist}
-\major{  }{}{block}{SCSI disk devices (48-63)}
-	\minor{0}{/dev/sdaw}{49th SCSI disk whole disk}
-	\minor{16}{/dev/sdax}{50th SCSI disk whole disk}
-	\minor{32}{/dev/sday}{51st SCSI disk whole disk}
-	\minordots
-	\minor{240}{/dev/sdbl}{64th SCSI disk whole disk}
-\end{devicelist}
-
-\noindent
-Partitions are handled in the same way as for IDE disks (see major
-number 3) except that the partition limit is 15 rather than 63 per
-disk.
-
-\begin{devicelist}
-\major{68}{}{char }{CAPI 2.0 interface}
-	\minor{0}{/dev/capi20}{Control device}
-	\minor{1}{/dev/capi20.00}{First CAPI 2.0 application}
-	\minor{2}{/dev/capi20.01}{Second CAPI 2.0 application}
-	\minordots
-	\minor{20}{/dev/capi20.19}{19th CAPI 2.0 application}
-\end{devicelist}
-
-\noindent
-ISDN CAPI 2.0 driver for use with CAPI 2.0 applications; currently
-supports the AVM B1 card.
-
-\begin{devicelist}
-\major{  }{}{block}{SCSI disk devices (64-79)}
-	\minor{0}{/dev/sdbm}{65th SCSI disk whole disk}
-	\minor{16}{/dev/sdbn}{66th SCSI disk whole disk}
-	\minor{32}{/dev/sdbo}{67th SCSI disk whole disk}
-	\minordots
-	\minor{240}{/dev/sdcb}{80th SCSI disk whole disk}
-\end{devicelist}
-
-\noindent
-Partitions are handled in the same way as for IDE disks (see major
-number 3) except that the partition limit is 15 rather than 63 per
-disk.
-
-\begin{devicelist}
-\major{69}{}{char }{MA16 numeric accelerator card}
-	\minor{0}{/dev/ma16}{Board memory access}
-\end{devicelist}
-
-\begin{devicelist}
-\major{  }{}{block}{SCSI disk devices (80-95)}
-	\minor{0}{/dev/sdcc}{81st SCSI disk whole disk}
-	\minor{16}{/dev/sdcd}{82nd SCSI disk whole disk}
-	\minor{32}{/dev/sdce}{83th SCSI disk whole disk}
-	\minordots
-	\minor{240}{/dev/sdcr}{96th SCSI disk whole disk}
-\end{devicelist}
-
-\noindent
-Partitions are handled in the same way as for IDE disks (see major
-number 3) except that the partition limit is 15 rather than 63 per
-disk.
-
-\begin{devicelist}
-\major{70}{}{char }{SpellCaster Protocol Services Interface}
-	\minor{0}{/dev/apscfg}{Configuration interface}
-	\minor{1}{/dev/apsauth}{Authentication interface}
-	\minor{2}{/dev/apslog}{Logging interface}
-	\minor{3}{/dev/apsdbg}{Debugging interface}
-	\minor{64}{/dev/apsisdn}{ISDN command interface}
-	\minor{65}{/dev/apsasync}{Async command interface}
-	\minor{128}{/dev/apsmon}{Monitor interface}
-\end{devicelist}
-
-\begin{devicelist}
-\major{  }{}{block}{SCSI disk devices (96-111)}
-	\minor{0}{/dev/sdcs}{97th SCSI disk whole disk}
-	\minor{16}{/dev/sdct}{98th SCSI disk whole disk}
-	\minor{32}{/dev/sdcu}{99th SCSI disk whole disk}
-	\minordots
-	\minor{240}{/dev/sddh}{112th SCSI disk whole disk}
-\end{devicelist}
-
-\noindent
-Partitions are handled in the same way as for IDE disks (see major
-number 3) except that the partition limit is 15 rather than 63 per
-disk.
-
-\begin{devicelist}
-\major{71}{}{char }{Computone IntelliPort II serial card}
-	\minor{0}{/dev/ttyF0}{IntelliPort II board 0, port 0}
-	\minor{1}{/dev/ttyF1}{IntelliPort II board 0, port 1}
-	\minordots
-	\minor{63}{/dev/ttyF63}{IntelliPort II board 0, port 63}
-	\minor{64}{/dev/ttyF64}{IntelliPort II board 1, port 0}
-	\minor{65}{/dev/ttyF65}{IntelliPort II board 1, port 1}
-	\minordots
-	\minor{127}{/dev/ttyF127}{IntelliPort II board 1, port 63}
-	\minor{128}{/dev/ttyF128}{IntelliPort II board 2, port 0}
-	\minor{129}{/dev/ttyF129}{IntelliPort II board 2, port 1}
-	\minordots
-	\minor{191}{/dev/ttyF191}{IntelliPort II board 2, port 63}
-	\minor{192}{/dev/ttyF192}{IntelliPort II board 3, port 0}
-	\minor{193}{/dev/ttyF193}{IntelliPort II board 3, port 1}
-	\minordots
-	\minor{255}{/dev/ttyF255}{IntelliPort II board 3, port 63}
-\end{devicelist}
-
-\begin{devicelist}
-\major{  }{}{block}{SCSI disk devices (112-127)}
-	\minor{0}{/dev/sddi}{113th SCSI disk whole disk}
-	\minor{16}{/dev/sddj}{114th SCSI disk whole disk}
-	\minor{32}{/dev/sddk}{115th SCSI disk whole disk}
-	\minordots
-	\minor{240}{/dev/sddx}{128th SCSI disk whole disk}
-\end{devicelist}
-
-\noindent
-Partitions are handled in the same way as for IDE disks (see major
-number 3) except that the partition limit is 15 rather than 63 per
-disk.
-
-\begin{devicelist}
-\major{72}{}{char }{Computone IntelliPort II serial card -- alternate devices}
-	\minor{0}{/dev/cuf0}{Callout device corresponding to {\file ttyF0}}
-	\minor{1}{/dev/cuf1}{Callout device corresponding to {\file ttyF1}}
-	\minordots
-	\minor{63}{/dev/cuf63}{Callout device corresponding to {\file ttyF63}}
-	\minor{64}{/dev/cuf64}{Callout device corresponding to {\file ttyF64}}
-	\minor{65}{/dev/cuf65}{Callout device corresponding to {\file ttyF65}}
-	\minordots
-	\minor{127}{/dev/cuf127}{Callout device corresponding to {\file ttyF127}}
-	\minor{128}{/dev/cuf128}{Callout device corresponding to {\file ttyF128}}
-	\minor{129}{/dev/cuf129}{Callout device corresponding to {\file ttyF129}}
-	\minordots
-	\minor{191}{/dev/cuf191}{Callout device corresponding to {\file ttyF191}}
-	\minor{192}{/dev/cuf192}{Callout device corresponding to {\file ttyF192}}
-	\minor{193}{/dev/cuf193}{Callout device corresponding to {\file ttyF193}}
-	\minordots
-	\minor{255}{/dev/cuf255}{Callout device corresponding to {\file ttyF255}}
-\end{devicelist}
-
-\begin{devicelist}
-\major{73}{}{char }{Computone IntelliPort II serial card -- control devices}
-	\minor{0}{/dev/ip2ipl0}{Loadware device for board 0}
-	\minor{1}{/dev/ip2stat0}{Status device for board 0}
-	\minor{4}{/dev/ip2ipl1}{Loadware device for board 1}
-	\minor{5}{/dev/ip2stat1}{Status device for board 1}
-	\minor{8}{/dev/ip2ipl2}{Loadware device for board 2}
-	\minor{9}{/dev/ip2stat2}{Status device for board 2}
-	\minor{12}{/dev/ip2ipl3}{Loadware device for board 3}
-	\minor{13}{/dev/ip2stat3}{Status device for board 3}
-\end{devicelist}
-
-\begin{devicelist}
-\major{74}{}{char }{SCI bridge}
-	\minor{0}{/dev/SCI/0}{SCI device 0}
-	\minor{1}{/dev/SCI/1}{SCI device 1}
-	\minordots
-\end{devicelist}
-
-\noindent
-Currently for Dolphin Interconnect Solutions' PCI-SCI bridge.
-
-\begin{devicelist}
-\major{75}{}{char }{Specialix IO8+ serial card}
-	\minor{0}{/dev/ttyW0}{First IO8+ port, first card}
-	\minor{1}{/dev/ttyW1}{Second IO8+ port, first card}
-	\minordots
-	\minor{8}{/dev/ttyW8}{First IO8+ port, second card}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{76}{}{char }{Specialix IO8+ serial card -- alternate devices}
-	\minor{0}{/dev/cuw0}{Callout device corresponding to {\file ttyW0}}
-	\minor{1}{/dev/cuw1}{Callout device corresponding to {\file ttyW1}}
-	\minordots
-	\minor{8}{/dev/cuw8}{Callout device corresponding to {\file ttyW8}}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{77}{}{char }{ComScire Quantum Noise Generator}
-	\minor{0}{/dev/qng}{ComScire Quantum Noise Generator}
-\end{devicelist}
-
-\begin{devicelist}
-\major{78}{}{char }{PAM Software's multimodem boards}
-	\minor{0}{/dev/ttyM0}{First PAM modem}
-	\minor{1}{/dev/ttyM1}{Second PAM modem}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{79}{}{char }{PAM Software's multimodem boards -- alternate devices}
-	\minor{0}{/dev/cum0}{Callout device corresponding to {\file ttyM0}}
-	\minor{1}{/dev/cum1}{Callout device corresponding to {\file ttyM1}}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{80}{}{char }{Photometrics AT200 CCD camera}
-	\minor{0}{/dev/at200}{Photometrics AT200 CCD camera}
-\end{devicelist}
-
-\begin{devicelist}
-\major{81}{}{char }{video4linux}
-	\minor{0}{/dev/video0}{Video capture/overlay device}
-	\minordots
-	\minor{63}{/dev/video63}{Video capture/overlay device}
-	\minor{64}{/dev/radio0}{Radio device}
-	\minordots
-	\minor{127}{/dev/radio63}{Radio device}
-	\minor{192}{/dev/vtx0}{Teletext device}
-	\minordots
-	\minor{223}{/dev/vtx31}{Teletext device}
-	\minor{224}{/dev/vbi0}{Vertical blank interupt}
-	\minordots
-	\minor{255}{/dev/vbi31}{Vertical blank interupt}
-\end{devicelist}
-
-\begin{devicelist}
-\major{82}{}{char }{WiNRADiO communications receiver card}
-	\minor{0}{/dev/winradio0}{First WiNRADiO card}
-	\minor{1}{/dev/winradio1}{Second WiNRADiO card}
-	\minordots
-\end{devicelist}
-
-\noindent
-The driver and documentation may be obtained from
-{\url http://www.proximity.com.au/~brian/winradio/\/}.
-
-\begin{devicelist}
-\major{83}{}{char }{Teletext/videotext interfaces}
-        \minor{0}{/dev/vtx}{Teletext decoder}
-        \minor{16}{/dev/vttuner}{TV tuner on teletext interface}
-\end{devicelist}
-
-\noindent
-Devices for the driver contained in the VideoteXt package. More information
-on {\url http://home.pages.de/~videotext/\/}.
-
-\begin{devicelist}
-\major{84}{}{char }{Ikon 1011[57] Versatec Greensheet Interface}
-	\minor{0}{/dev/ihcp0}{First Greensheet port}
-	\minor{1}{/dev/ihcp1}{Second Greensheet port}
-\end{devicelist}
-
-\begin{devicelist}
-\major{85}{}{char }{Linux/SGI shared memory input queue}
-	\minor{0}{/dev/shmiq}{Master shared input queue}
-	\minor{1}{/dev/qcntl0}{First device pushed}
-	\minor{2}{/dev/qcntl1}{Second device pushed}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{86}{}{char }{SCSI media changer}
-	\minor{0}{/dev/sch0}{First SCSI media changer}
-	\minor{1}{/dev/sch1}{Second SCSI media changer}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{87}{}{char }{Sony Control-A1 stereo control bus}
-	\minor{0}{/dev/controla0}{First device on chain}
-	\minor{1}{/dev/controla1}{Second device on chain}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{88}{}{char }{COMX synchronous serial card}
-	\minor{0}{/dev/comx0}{Channel 0}
-	\minor{1}{/dev/comx1}{Channel 1}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{89}{}{char }{I$^2$C bus interface}
-	\minor{0}{/dev/i2c0}{First I$^2$C adapter}
-	\minor{1}{/dev/i2c1}{Second I$^2$C adapter}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{90}{}{char }{Memory Technology Device (RAM, ROM, Flash)}
-        \minor{0}{/dev/mtd0}{First MTD (rw)}
-        \minor{1}{/dev/mtdr0}{First MTD (ro)}
-        \minordots
-        \minor{30}{/dev/mtd15}{16th MTD (rw)}
-        \minor{31}{/dev/mtdr15}{16th MTD (ro)}
-\end{devicelist}
-
-\begin{devicelist}
-\major{91}{}{char }{CAN-Bus controller}
-	\minor{0}{/dev/can0}{First CAN-Bus controller}
-	\minor{1}{/dev/can1}{Second CAN-Bus controller}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{92}{}{char }{Reserved for ith Kommunikationstechnik MIC ISDN card}
-\end{devicelist}
-
-\begin{devicelist}
-\major{93}{}{char }{IBM Smart Capture Card frame grabber}
-	\minor{0}{/dev/iscc0}{First Smart Capture Card}
-	\minor{1}{/dev/iscc1}{Second Smart Capture Card}
-	\minordots
-	\minor{128}{/dev/isccctl0}{First Smart Capture Card control}
-	\minor{129}{/dev/isccctl1}{Second Smart Capture Card control}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{94}{}{char }{miroVIDEO DC10/30 capture/playback device}
-	\minor{0}{/dev/dcxx0}{First capture card}
-	\minor{1}{/dev/dcxx1}{Second capture card}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{95}{}{char }{IP filter}
-	\minor{0}{/dev/ipl}{Filter control device/log file}
-	\minor{1}{/dev/ipnat}{NAT control device/log file}
-	\minor{2}{/dev/ipstate}{State information log file}
-	\minor{3}{/dev/ipauth}{Authentication control device/log file}
-\end{devicelist}
-
-\begin{devicelist}
-\major{96}{}{char }{Parallel port ATAPI tape devices}
-	\minor{0}{/dev/pt0}{First parallel port ATAPI tape}
-	\minor{1}{/dev/pt1}{Second parallel port ATAPI tape}
-	\minor{2}{/dev/pt2}{Third parallel port ATAPI tape}
-	\minor{3}{/dev/pt3}{Fourth parallel port ATAPI tape}
-	\minor{128}{/dev/npt0}{First parallel port ATAPI tape, no rewind}
-	\minor{129}{/dev/npt1}{Second parallel port ATAPI tape, no rewind}
-	\minor{130}{/dev/npt2}{Third parallel port ATAPI tape, no rewind}
-	\minor{131}{/dev/npt3}{Fourth parallel port ATAPI tape, no rewind}
-\end{devicelist}
-
-\begin{devicelist}
-\major{97}{}{char }{Parallel port generic ATAPI interface}
-	\minor{0}{/dev/pg0}{First parallel port ATAPI device}
-	\minor{1}{/dev/pg1}{Second parallel port ATAPI device}
-	\minor{2}{/dev/pg2}{Third parallel port ATAPI device}
-	\minor{3}{/dev/pg3}{Fourth parallel port ATAPI device}
-\end{devicelist}
-
-\noindent
-These devices support the same API as the generic SCSI devices.
-
-\begin{devicelist}
-\major{98}{}{char }{Control and Mesurement Device (comedi)}
-	\minor{0}{/dev/comedi0}{First comedi device}
-	\minor{1}{/dev/comedi1}{Second comedi device}
-	\minordots
-\end{devicelist}
-
-\noindent
-See {\url http://stm.lbl.gov/comedi/} or {\url
-http://www.llp.fu-berlin.de/}.
-
-\begin{devicelist}
-\major{99}{}{char }{Raw parallel ports}
-	\minor{0}{/dev/parport0}{First parallel port}
-	\minor{1}{/dev/parport1}{Second parallel port}
-	\minordots
-\end{devicelist}
-
-\noindent
-These devices can be used to drive parallel port devices from
-user-space while interacting with the parport sharing code.
-
-\begin{devicelist}
-\major{100}{}{char }{POTS (analogue telephone) A/B port}
-	\minor{0}{/dev/phone0}{First telephone port}
-	\minor{1}{/dev/phone1}{Second telephone port}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{101}{}{char }{Motorola DSP 56xxx board}
-	\minor{0}{/dev/mdspstat}{Status information}
-	\minor{1}{/dev/mdsp1}{First DSP board I/O and controls}
-	\minordots
-	\minor{16}{/dev/mdsp16}{16th DSP board I/O and controls}
-\end{devicelist}
-
-\begin{devicelist}
-\major{102}{}{char }{Philips SAA5249 Teletext signal decoder}
-	\minor{0}{/dev/tlk0}{First Teletext decoder}
-	\minor{1}{/dev/tlk1}{Second Teletext decoder}
-	\minor{2}{/dev/tlk2}{Third Teletext decoder}
-	\minor{3}{/dev/tlk3}{Fourth Teletext decoder}
-\end{devicelist}
-
-\begin{devicelist}
-\major{103}{}{char }{Arla network file system}
-	\minor{0}{/dev/xfs0}{Arla XFS}
-\end{devicelist}
-
-\noindent
-Arla is a free clone of the Andrew File System, AFS.  Any resemblance
-with the Swedish milk producer is coincidental.  For more information
-about the project, write to $<$arla-drinkers@stacken.kth.se$>$ or
-subscribe to the arla-announce mailing list by sending a mail to
-$<$arla-announce-request@stacken.kth.se$>$.
-
-\begin{devicelist}
-\major{104}{}{char }{Flash BIOS support}
-\end{devicelist}
-
-\begin{devicelist}
-\major{105}{}{char }{Comtrol VS-1000 serial card}
-	\minor{0}{/dev/ttyV0}{First VS-1000 port}
-	\minor{1}{/dev/ttyV1}{Second VS-1000 port}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{106}{}{char }{Comtrol VS-1000 serial card -- alternate devices}
-	\minor{0}{/dev/cuv0}{Callout device corresponding to {\file ttyV0}}
-	\minor{1}{/dev/cuv1}{Callout device corresponding to {\file ttyV1}}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{107}{}{char }{3Dfx Voodoo Graphics device}
-	\minor{0}{/dev/3dfx}{Primary 3Dfx graphics device}
-\end{devicelist}
-
-\begin{devicelist}
-\major{108}{}{char }{Device independent PPP interface}
-	\minor{0}{/dev/ppp}{Device independent PPP interface}
-\end{devicelist}
-
-\begin{devicelist}
-\major{109}{}{char }{Reserved for logical volume manager}
-\end{devicelist}
-
-\begin{devicelist}
-\major{110}{}{char }{miroMEDIA Surround board}
-	\minor{0}{/dev/srnd0}{First miroMEDIA Surround board}
-	\minor{1}{/dev/srnd1}{First miroMEDIA Surround board}
-	\minordots
-\end{devicelist}
-
-\begin{devicelist}
-\major{111}{--119}{}{Unallocated}
-\end{devicelist}
-
-\begin{devicelist}
-\major{120}{--127}{}{Local/experimental use}
-\end{devicelist}
-
-\begin{devicelist}
-\major{128}{--135}{char }{Unix98 PTY masters}
-\end{devicelist}
-
-\noindent
-These devices should not have corresponding device nodes; instead they
-should be accessed through the {\file /dev/ptmx} cloning device.
-
-\begin{devicelist}
-\major{136}{--143}{char }{Unix98 PTY slaves}
-	\minor{0}{/dev/pts/0}{First Unix98 pseudo-TTY}
-	\minor{1}{/dev/pts/1}{Second Unix98 pseudo-TTY}
-	\minordots
-\end{devicelist}
-
-\noindent
-These device nodes are automatically generated with the proper
-permissions and modes by mounting the {\file devpts} filesystem onto
-{\file /dev/pts} with the appropriate mount options (distribution
-dependent.)
-
-\begin{devicelist}
-\major{144}{--239}{}{Unallocated}
-\end{devicelist}
-
-\begin{devicelist}
-\major{240}{--254}{}{Local/experimental use}
-\end{devicelist}
-
-\begin{devicelist}
-\major{255}{}{}{Reserved}
-\end{devicelist}
-
-\noindent
-This major is reserved to assist the expansion to a larger number
-space.  No device nodes with this major should ever be created on any
-filesystem.
-
-\section{Additional /dev directory entries}
-
-This section details additional entries that should or may exist in the
-{\file /dev} directory.  It is preferred that symbolic links use the
-same form (absolute or relative) as is indicated here.  Links are
-classified as {\em hard\/} or {\em symbolic\/} depending on the
-preferred type of link; if possible, the indicated type of link should
-be used.
-
-\subsection{Compulsory links}
-
-These links should exist on all systems:
-
-\begin{nodelist}
-\link{/dev/fd}{/proc/self/fd}{symbolic}{File descriptors}
-\link{/dev/stdin}{fd/0}{symbolic}{Standard input file descriptor}
-\link{/dev/stdout}{fd/1}{symbolic}{Standard output file descriptor}
-\link{/dev/stderr}{fd/2}{symbolic}{Standard error file descriptor}
-\link{/dev/nfsd}{socksys}{symbolic}{Required by iBCS-2}
-\link{/dev/X0R}{null}{symbolic}{Required by iBCS-2}
-\end{nodelist}
-
-\noindent
-Note: The last device is: $<$letter {\tt X}$>$-$<$digit {\tt
-0}$>$-$<$letter {\tt R}$>$.
-
-\subsection{Recommended links}
-
-It is recommended that these links exist on all systems:
-
-\begin{nodelist}
-\link{/dev/core}{/proc/kcore}{symbolic}{Backward compatibility}
-\link{/dev/ramdisk}{ram0}{symbolic}{Backward compatibility}
-\link{/dev/ftape}{qft0}{symbolic}{Backward compatibility}
-\link{/dev/bttv0}{video0}{symbolic}{Backward compatibility}
-\link{/dev/radio}{radio0}{symbolic}{Backward compatibility}
-\link{/dev/scd?}{sr?}{hard}{Alternate name for CD-ROMs}
-\end{nodelist}
-
-\subsection{Locally defined links}
-
-The following links may be established locally to conform to the
-configuration of the system.  This is merely a tabulation of existing
-practice, and does not constitute a recommendation.  However, if they
-exist, they should have the following uses.
-
-\begin{nodelist}
-\vlink{/dev/mouse}{mouse port}{symbolic}{Current mouse device}
-\vlink{/dev/tape}{tape device}{symbolic}{Current tape device}
-\vlink{/dev/cdrom}{CD-ROM device}{symbolic}{Current CD-ROM device}
-\vlink{/dev/cdwriter}{CD-writer}{symbolic}{Current CD-writer device}
-\vlink{/dev/scanner}{scanner device}{symbolic}{Current scanner device}
-\vlink{/dev/modem}{modem port}{symbolic}{Current dialout device}
-\vlink{/dev/root}{root device}{symbolic}{Current root filesystem}
-\vlink{/dev/swap}{swap device}{symbolic}{Current swap device}
-\end{nodelist}
-
-\noindent
-{\file /dev/modem} should not be used for a modem which supports
-dialin as well as dialout, as it tends to cause lock file problems.
-If it exists, {\file /dev/modem} should point to the appropriate
-primary TTY device (the use of the alternate callout devices is
-deprecated.)
-
-For SCSI devices, {\file /dev/tape} and {\file /dev/cdrom} should
-point to the ``cooked'' devices ({\file /dev/st*} and {\file
-/dev/sr*}, respectively), whereas {\file /dev/cdwriter} and {\file
-/dev/scanner} should point to the appropriate generic SCSI devices
-({\file /dev/sg*}).
-
-{\file /dev/mouse} may point to a primary serial TTY device, a
-hardware mouse device, or a socket for a mouse driver program
-(e.g. {\file /dev/gpmdata}).
-
-\subsection{Sockets and pipes}
-
-Non-transient sockets or named pipes may exist in {\file /dev}.
-Common entries are:
-
-\begin{nodelist}
-\node{/dev/printer}{socket}{{\file lpd} local socket}
-\node{/dev/log}{socket}{{\file syslog} local socket}
-\node{/dev/gpmdata}{socket}{{\file gpm} mouse multiplexer}
-\end{nodelist}
-
-\section{Terminal devices}
-
-Terminal, or TTY devices are a special class of character devices.  A
-terminal device is any device that could act as a controlling terminal
-for a session; this includes virtual consoles, serial ports, and
-pseudoterminals (PTYs).
-
-All terminal devices share a common set of capabilities known as line
-diciplines; these include the common terminal line dicipline as well
-as SLIP and PPP modes.
-
-All terminal devices are named similarly; this section explains the
-naming and use of the various types of TTYs.  Note that the naming
-conventions include several historical warts; some of these are
-Linux-specific, some were inherited from other systems, and some
-reflect Linux outgrowing a borrowed convention.
-
-A hash mark ($\#$) in a device name is in all cases used here to
-indicate a decimal number without leading zeroes.
-
-\subsection{Virtual consoles and the console device}
-
-Virtual consoles are full-screen terminal displays on the system video
-monitor.  Virtual consoles are named {\file /dev/tty$\#$}, with
-numbering starting at {\file /dev/tty1}; {\file /dev/tty0} is the
-current virtual console.  {\file /dev/tty0} is the device that should
-be used to access the system video card on those architectures for
-which the frame buffer devices ({\file /dev/fb*}) are not applicable.
-Do not use {\file /dev/console} for this purpose.
-
-The {\em console device\/}, {\file /dev/console}, is the device to
-which system messages should be sent, and on which logins should be
-permitted in single-user mode.  Starting with Linux 2.1.71, {\file
-/dev/console} is managed by the kernel; for previous versions it
-should be a symbolic link to either {\file /dev/tty0}, a specific
-virtual console such as {\file /dev/tty1}, or to a serial port primary
-({\file tty*}, not {\file cu*}) device, depending on the configuration
-of the system.
-
-\subsection{Serial ports}
-
-Serial ports are RS-232 serial ports and any device which simulates
-one, either in hardware (such as internal modems) or in software (such
-as the ISDN driver.)  Under Linux, each serial ports has two device
-names, the primary or callin device and the alternate or callout one.
-Each kind of device is indicated by a different letter.  For any
-letter $X$, the names of the devices are {\file /dev/tty${X\#}$} and
-{\file /dev/cu${x\#}$}, respectively; for historical reasons, {\file
-/dev/ttyS$\#$} and {\file /dev/ttyC$\#$} correspond to {\file
-/dev/cua$\#$} and {\file /dev/cub$\#$}.  In the future, it should be
-expected that multiple letters will be used; all letters will be upper
-case for the {\file tty} device (e.g. {\file /dev/ttyDP$\#$} and lower
-case for the {\file cu} device (e.g. {\file /dev/cudp$\#$}.
-
-The use of the callout devices is deprecated.
-
-The names {\file /dev/ttyQ$\#$} and {\file /dev/cuq$\#$} are reserved
-for local use.
-
-The alternate devices provide for kernel-based exclusion and somewhat
-different defaults than the primary devices.  Their main purpose is to
-allow the use of serial ports with programs with no inherent or broken
-support for serial ports.  Their use is deprecated, and they may be
-removed from a future version of Linux.
-
-Arbitration of serial ports is provided by the use of lock files with
-the names {\file /var/lock/LCK..tty${X\#}$}.  The contents of the lock
-file should be the PID of the locking process as an ASCII number.
-
-It is common practice to install links such as {\file /dev/modem\/}
-which point to serial ports.  In order to ensure proper locking in the
-presence of these links, it is recommended that software chase
-symlinks and lock all possible names; additionally, it is recommended
-that a lock file be installed with the corresponding alternate
-device.  In order to avoid deadlocks, it is recommended that the locks
-are acquired in the following order, and released in the reverse:
-\begin{itemize}
-\item{The symbolic link name, if any ({\file /var/lock/LCK..modem})}
-\item{The {\file tty} name ({\file /var/lock/LCK..ttyS2})}
-\item{The alternate device name ({\file /var/lock/LCK..cua2})}
-\end{itemize}
-In the case of nested symbolic links, the lock files should be
-installed in the order the symlinks are resolved.
-
-Under no circumstances should an application hold a lock while waiting
-for another to be released.  In addition, applications which attempt
-to create lock files for the corresponding alternate device names
-should take into account the possibility of being used on a non-serial
-port TTY, for which no alternate device would exist.
-
-\subsection{Pseudoterminals (PTYs)}
-
-Pseudoterminals, or PTYs, are used to create login sessions or provide
-other capabilities requiring a TTY line dicipline (including SLIP or
-PPP capability) to arbitrary data-generation processes.  Each PTY has
-a {\em master\/} side, named {\file /dev/pty[p-za-e][0-9a-f]\/}, and a
-{\em slave\/} side, named {\file /dev/tty[p-za-e][0-9a-f]\/}.  The
-kernel arbitrates the use of PTYs by allowing each master side to be
-opened only once.
-
-Once the master side has been opened, the corresponding slave device
-can be used in the same manner as any TTY device.  The master and
-slave devices are connected by the kernel, generating the equivalent
-of a bidirectional pipe with TTY capabilities.
-
-Recent versions of the Linux kernels and GNU libc contain support for
-the System V/Unix98 naming scheme for PTYs, which assigns a common
-device {\file /dev/ptmx\/} to all the masters (opening it will
-automatically give you a previously unassigned PTY) and a subdirectory
-{\file /dev/pts\/} for the slaves; the slaves are named with decimal
-integers ({\file /dev/pts/$\#$\/} in our notation).  This removes the
-problem of exhausting the namespace and enables the kernel to
-automatically create the device nodes for the slaves on demand using
-the {\file devpts\/} filesystem.
-
-\end{document}
diff -urN linux-2.2.14-pre14/Documentation/devices.txt linux-2.2.14-pre15/Documentation/devices.txt
--- linux-2.2.14-pre14/Documentation/devices.txt	1998-12-16 12:52:00.000000000 -0800
+++ linux-2.2.14-pre15/Documentation/devices.txt	2003-08-15 15:09:49.000000000 -0700
@@ -1,21 +1,21 @@
+
 		       LINUX ALLOCATED DEVICES
 	     Maintained by H. Peter Anvin <hpa@zytor.com>
 
-		    Last revised: August 10, 1998
+		   Last revised: December 16, 1999
 
 This list is the Linux Device List, the official registry of allocated
 device numbers and /dev directory nodes for the Linux operating
 system.
 
 The latest version of this list is included with the Linux kernel
-sources in LaTeX and ASCII form.  It is also available separately from
-ftp://ftp.kernel.org/pub/linux/docs/device-list/.  In case of
-discrepancy between the text and LaTeX versions, the LaTeX version is
-authoritative.
-
-This document is included by reference into the Linux Filesystem
-Standard (FSSTND).  The FSSTND is available from
-ftp://tsx-11.mit.edu/pub/linux/docs/linux-standards/fsstnd/.
+sources.  It is also available separately from 
+http://www.kernel.org/pub/linux/docs/device-list/ or
+ftp://ftp.kernel.org/pub/linux/docs/device-list/.  The LaTeX version
+of this document is no longer maintained.
+
+This document is included by reference into the Filesystem Hierarchy
+Standard (FHS).  The FHS is available from http://www.pathname.com/fhs/.
 
 Allocations marked (68k/Amiga) apply to Linux/68k on the Amiga
 platform only.	Allocations marked (68k/Atari) apply to Linux/68k on
@@ -33,6 +33,7 @@
 on this list.  Any such information requests will be deleted without
 reply.
 
+
      **** PLEASE READ THIS BEFORE SUBMITTING A DEVICE ENTRY ****
 
 To have a major number allocated, or a minor number in situations
@@ -53,6 +54,13 @@
 found to ensure I have all the requisite information to publish your
 device and avoid conflicts.
 
+Finally, sometimes I have to play "namespace police."  Please don't be
+offended.  I often get submissions for /dev names that would be bound
+to cause conflicts down the road.  I am trying to avoid getting in a
+situation where we would have to suffer an incompatible forward
+change.
+
+
 Your cooperation is appreciated.
 
 
@@ -98,14 +106,14 @@
 		demand.
   
     block	Floppy disks
-		  0 = /dev/fd0		Controller 1, drive 1 autodetect
-		  1 = /dev/fd1		Controller 1, drive 2 autodetect
-		  2 = /dev/fd2		Controller 1, drive 3 autodetect
-		  3 = /dev/fd3		Controller 1, drive 4 autodetect
-		128 = /dev/fd4		Controller 2, drive 1 autodetect
-		129 = /dev/fd5		Controller 2, drive 2 autodetect
-		130 = /dev/fd6		Controller 2, drive 3 autodetect
-		131 = /dev/fd7		Controller 2, drive 4 autodetect
+		  0 = /dev/fd0		Controller 0, drive 0, autodetect
+		  1 = /dev/fd1		Controller 0, drive 1, autodetect
+		  2 = /dev/fd2		Controller 0, drive 2, autodetect
+		  3 = /dev/fd3		Controller 0, drive 3, autodetect
+		128 = /dev/fd4		Controller 1, drive 0, autodetect
+		129 = /dev/fd5		Controller 1, drive 1, autodetect
+		130 = /dev/fd6		Controller 1, drive 2, autodetect
+		131 = /dev/fd7		Controller 1, drive 3, autodetect
 
 		To specify format, add to the autodetect device number:
 		  0 = /dev/fd?		Autodetect format
@@ -183,17 +191,11 @@
 		  0 = /dev/tty0		Current virtual console
 
 		  1 = /dev/tty1		First virtual console
-		      ...
+		    ...
 		 63 = /dev/tty63	63rd virtual console
-		 64 = /dev/ttyS0	First serial port
-		      ...
-		127 = /dev/ttyS63	64th serial port
-		128 = /dev/ptyp0	OBSOLETE
-		      ...
-		191 = /dev/ptysf	OBSOLETE
-		192 = /dev/ttyp0	OBSOLETE
-		      ...
-		255 = /dev/ttysf	OBSOLETE
+		 64 = /dev/ttyS0	First UART serial port
+		    ...
+		255 = /dev/ttyS191	192nd UART serial port
 
 		Older versions of the Linux kernel used this major
 		number for BSD PTY devices.  As of Linux 2.1.115, this
@@ -203,31 +205,31 @@
 		  0 = /dev/tty		Current TTY device
 		  1 = /dev/console	System console
 		  2 = /dev/ptmx		PTY master multiplex
-		 64 = /dev/cua0		Callout device corresponding to ttyS0
-		      ...
-		127 = /dev/cua63	Callout device corresponding to ttyS63
+		 64 = /dev/cua0		Callout device for ttyS0
+		    ...
+		255 = /dev/cua191	Callout device for ttyS191
 
 		(5,1) is /dev/console starting with Linux 2.1.71.  See
 		the section on terminal devices for more information
 		on /dev/console.
 
   6 char	Parallel printer devices
-		  0 = /dev/lp0		First parallel printer (0x3bc)
-		  1 = /dev/lp1		Second parallel printer (0x378)
-		  2 = /dev/lp2		Third parallel printer (0x278)
-
-		Not all computers have the 0x3bc parallel port; hence
-		the "first" printer may be either /dev/lp0 or
-		/dev/lp1.
+		  0 = /dev/lp0		Parallel printer on parport0
+		  1 = /dev/lp1		Parallel printer on parport1
+		    ...
+
+		Current Linux kernels no longer have a fixed mapping
+		between parallel ports and I/O addresses.  Instead,
+		they are redirected through the parport multiplex layer.
 
   7 char	Virtual console capture devices
 		  0 = /dev/vcs		Current vc text contents
 		  1 = /dev/vcs1		tty1 text contents
-		      ...
+		    ...
 		 63 = /dev/vcs63	tty63 text contents
 		128 = /dev/vcsa		Current vc text/attribute contents
 		129 = /dev/vcsa1	tty1 text/attribute contents
-		      ...
+		    ...
 		191 = /dev/vcsa63	tty63 text/attribute contents
 	
 		NOTE: These devices permit both read and write access.
@@ -235,7 +237,7 @@
     block	Loopback devices
 		  0 = /dev/loop0	First loopback device
 		  1 = /dev/loop1	Second loopback device
-		      ...
+		    ...
 
 		The loopback devices are used to mount filesystems not
 		associated with block devices.	The binding to the
@@ -245,7 +247,7 @@
 		  0 = /dev/sda		First SCSI disk whole disk
 		 16 = /dev/sdb		Second SCSI disk whole disk
 		 32 = /dev/sdc		Third SCSI disk whole disk
-		      ...
+		    ...
 		240 = /dev/sdp		Sixteenth SCSI disk whole disk
 
 		Partitions are handled in the same way as for IDE
@@ -255,28 +257,28 @@
   9 char	SCSI tape devices
 		  0 = /dev/st0		First SCSI tape, mode 0
 		  1 = /dev/st1		Second SCSI tape, mode 0
-		      ...
+		    ...
 		 32 = /dev/st0l		First SCSI tape, mode 1
 		 33 = /dev/st1l		Second SCSI tape, mode 1
-		      ...
+		    ...
 		 64 = /dev/st0m		First SCSI tape, mode 2
 		 65 = /dev/st1m		Second SCSI tape, mode 2
-		      ...
+		    ...
 		 96 = /dev/st0a		First SCSI tape, mode 3
 		 97 = /dev/st1a		Second SCSI tape, mode 3
 		      ...
 		128 = /dev/nst0		First SCSI tape, mode 0, no rewind
 		129 = /dev/nst1		Second SCSI tape, mode 0, no rewind
-		      ...
+		    ...
 		160 = /dev/nst0l	First SCSI tape, mode 1, no rewind
 		161 = /dev/nst1l	Second SCSI tape, mode 1, no rewind
-		      ...
+		    ...
 		192 = /dev/nst0m	First SCSI tape, mode 2, no rewind
 		193 = /dev/nst1m	Second SCSI tape, mode 2, no rewind
-		      ...
+		    ...
 		224 = /dev/nst0a	First SCSI tape, mode 3, no rewind
 		225 = /dev/nst1a	Second SCSI tape, mode 3, no rewind
-		      ...
+		    ...
 
 		"No rewind" refers to the omission of the default
 		automatic rewind on device close.  The MTREW or MTOFFL
@@ -286,7 +288,7 @@
     block	Metadisk (RAID) devices
 		  0 = /dev/md0		First metadisk group
 		  1 = /dev/md1		Second metadisk group
-		      ...
+		    ...
 
 		The metadisk driver is used to span a
 		filesystem across multiple physical disks.
@@ -326,6 +328,32 @@
 		151 = /dev/led		Front panel LEDs
 		153 = /dev/mergemem	Memory merge device
 		154 = /dev/pmu		Macintosh PowerBook power manager
+		155 = /dev/isictl	MultiTech ISICom serial control
+		156 = /dev/lcd		Front panel LCD display
+		157 = /dev/ac		Applicom Intl Profibus card
+		158 = /dev/nwbutton	Netwinder external button
+		159 = /dev/nwdebug	Netwinder debug interface
+		160 = /dev/nwflash	Netwinder flash memory
+		161 = /dev/userdma	User-space DMA access
+		162 = /dev/smbus	System Management Bus
+		163 = /dev/lik		Logitech Internet Keyboard
+		164 = /dev/ipmo		Intel Intelligent Platform Management
+		165 = /dev/vmmon	VMWare virtual machine monitor
+		166 = /dev/i2o/ctl	I2O configuration manager
+		167 = /dev/specialix_sxctl Specialix serial control
+		168 = /dev/tcldrv	Technology Concepts serial control
+		169 = /dev/specialix_rioctl Specialix RIO serial control
+		170 = /dev/smapi	IBM Thinkpad SMAPI
+		171 = /dev/srripc	QNX4 API IPC manager
+		172 = /dev/usemaclone	Semaphore clone device
+		173 = /dev/ipmikcs	Intelligent Platform Management
+		174 = /dev/uctrl	SPARCbook 3 microcontroller
+		175 = /dev/agpgart	AGP Graphics Address Remapping Table
+		176 = /dev/gtrsc	Gorgy Timing radio clock
+		177 = /dev/cbm		Serial CBM bus
+		178 = /dev/jsflash	JavaStation OS flash SIMM
+		179 = /dev/xsvc		High-speed shared-mem/semaphore service
+		240-255			Reserved for local use
 
  11 char	Raw keyboard device
 		  0 = /dev/kbd		Raw keyboard device
@@ -335,7 +363,7 @@
     block	SCSI CD-ROM devices
 		  0 = /dev/sr0		First SCSI CD-ROM
 		  1 = /dev/sr1		Second SCSI CD-ROM
-		      ...
+		    ...
 
 		The prefix /dev/scd instead of /dev/sr has been used
 		as well, and might make more sense.
@@ -356,13 +384,17 @@
     block	MSCDEX CD-ROM callback support
 		  0 = /dev/dos_cd0	First MSCDEX CD-ROM
 		  1 = /dev/dos_cd1	Second MSCDEX CD-ROM
-		      ...
+		    ...
 
- 13 char	PC speaker
+ 13 char	PC speaker (OBSOLETE)
 		  0 = /dev/pcmixer	Emulates /dev/mixer
 		  1 = /dev/pcsp		Emulates /dev/dsp (8-bit)
 		  4 = /dev/pcaudio	Emulates /dev/audio
 		  5 = /dev/pcsp16	Emulates /dev/dsp (16-bit)
+
+		The current PC speaker driver uses the Open Sound
+		System interface, and these devices are obsolete.
+
     block	8-bit MFM/RLL/IDE controller
 		  0 = /dev/xda		First XT disk whole disk
 		 64 = /dev/xdb		Second XT disk whole disk
@@ -370,13 +402,14 @@
 		Partitions are handled in the same way as IDE disks
 		(see major number 3).
 
- 14 char	Sound card
+ 14 char	Open Sound System (OSS)
 		  0 = /dev/mixer	Mixer control
 		  1 = /dev/sequencer	Audio sequencer
 		  2 = /dev/midi00	First MIDI port
 		  3 = /dev/dsp		Digital audio
 		  4 = /dev/audio	Sun-compatible digital audio
 		  6 = /dev/sndstat	Sound card status information
+		  7 = /dev/audioctl	SPARC audio control device
 		  8 = /dev/sequencer2	Sequencer -- alternate device
 		 16 = /dev/mixer1	Second soundcard mixer control
 		 17 = /dev/patmgr0	Sequencer patch manager
@@ -413,43 +446,43 @@
  17 char	Chase serial card
 		  0 = /dev/ttyH0	First Chase port
 		  1 = /dev/ttyH1	Second Chase port
-		      ...
+		    ...
     block	Optics Storage CD-ROM
 		  0 = /dev/optcd	Optics Storage CD-ROM
 
  18 char	Chase serial card - alternate devices
-		  0 = /dev/cuh0		Callout device corresponding to ttyH0
-		  1 = /dev/cuh1		Callout device corresponding to ttyH1
-		      ...
+		  0 = /dev/cuh0		Callout device for ttyH0
+		  1 = /dev/cuh1		Callout device for ttyH1
+		    ...
     block	Sanyo CD-ROM
 		  0 = /dev/sjcd		Sanyo CD-ROM
 
  19 char	Cyclades serial card
 		  0 = /dev/ttyC0	First Cyclades port
-		      ...
+		    ...
 		 31 = /dev/ttyC31	32nd Cyclades port
     block	"Double" compressed disk
 		  0 = /dev/double0	First compressed disk
-		      ...
+		    ...
 		  7 = /dev/double7	Eighth compressed disk
 		128 = /dev/cdouble0	Mirror of first compressed disk
-		      ...
+		    ...
 		135 = /dev/cdouble7	Mirror of eighth compressed disk
 
 		See the Double documentation for the meaning of the
 		mirror devices.
 
  20 char	Cyclades serial card - alternate devices
-		  0 = /dev/cub0		Callout device corresponding to ttyC0
-		      ...
-		 31 = /dev/cub31	Callout device corresponding to ttyC31
+		  0 = /dev/cub0		Callout device for ttyC0
+		    ...
+		 31 = /dev/cub31	Callout device for ttyC31
     block	Hitachi CD-ROM (under development)
 		  0 = /dev/hitcd	Hitachi CD-ROM
 
  21 char	Generic SCSI access
 		  0 = /dev/sg0		First generic SCSI device
 		  1 = /dev/sg1		Second generic SCSI device
-		      ...
+		    ...
 
 		Most distributions name these /dev/sga, /dev/sgb...;
 		this sets an unnecessary limit of 26 SCSI devices in
@@ -467,7 +500,7 @@
  22 char	Digiboard serial card
 		  0 = /dev/ttyD0	First Digiboard port
 		  1 = /dev/ttyD1	Second Digiboard port
-		      ...
+		    ...
     block	Second IDE hard disk/CD-ROM interface
 		  0 = /dev/hdc		Master: whole disk (or CD-ROM)
 		 64 = /dev/hdd		Slave: whole disk (or CD-ROM)
@@ -476,8 +509,8 @@
 		interface (see major number 3).
 
  23 char	Digiboard serial card - alternate devices
-		  0 = /dev/cud0		Callout device corresponding to ttyD0
-		  1 = /dev/cud1		Callout device corresponding to ttyD1
+		  0 = /dev/cud0		Callout device for ttyD0
+		  1 = /dev/cud1		Callout device for ttyD1
 		      ...
     block	Mitsumi proprietary CD-ROM
 		  0 = /dev/mcd		Mitsumi CD-ROM
@@ -485,31 +518,31 @@
  24 char	Stallion serial card
 		  0 = /dev/ttyE0	Stallion port 0 card 0
 		  1 = /dev/ttyE1	Stallion port 1 card 0
-		      ...
+		    ...
 		 64 = /dev/ttyE64	Stallion port 0 card 1
 		 65 = /dev/ttyE65	Stallion port 1 card 1
 		      ...
 		128 = /dev/ttyE128	Stallion port 0 card 2
 		129 = /dev/ttyE129	Stallion port 1 card 2
-		      ...
+		    ...
 		192 = /dev/ttyE192	Stallion port 0 card 3
 		193 = /dev/ttyE193	Stallion port 1 card 3
-		      ...
+		    ...
     block	Sony CDU-535 CD-ROM
 		  0 = /dev/cdu535	Sony CDU-535 CD-ROM
 
  25 char	Stallion serial card - alternate devices
-		  0 = /dev/cue0		Callout device corresponding to ttyE0
-		  1 = /dev/cue1		Callout device corresponding to ttyE1
-		      ...
-		 64 = /dev/cue64	Callout device corresponding to ttyE64
-		 65 = /dev/cue65	Callout device corresponding to ttyE65
-		      ...
-		128 = /dev/cue128	Callout device corresponding to ttyE128
-		129 = /dev/cue129	Callout device corresponding to ttyE129
-		      ...
-		192 = /dev/cue192	Callout device corresponding to ttyE192
-		193 = /dev/cue193	Callout device corresponding to ttyE193
+		  0 = /dev/cue0		Callout device for ttyE0
+		  1 = /dev/cue1		Callout device for ttyE1
+		    ...
+		 64 = /dev/cue64	Callout device for ttyE64
+		 65 = /dev/cue65	Callout device for ttyE65
+		    ...
+		128 = /dev/cue128	Callout device for ttyE128
+		129 = /dev/cue129	Callout device for ttyE129
+		    ...
+		192 = /dev/cue192	Callout device for ttyE192
+		193 = /dev/cue193	Callout device for ttyE193
 		      ...
     block	First Matsushita (Panasonic/SoundBlaster) CD-ROM
 		  0 = /dev/sbpcd0	Panasonic CD-ROM controller 0 unit 0
@@ -537,7 +570,7 @@
 		 16 = /dev/zqft0	Unit 0, rewind-on-close, compression
 		 17 = /dev/zqft1	Unit 1, rewind-on-close, compression
 		 18 = /dev/zqft2	Unit 2, rewind-on-close, compression
-		 19 = /dev/zqt3		Unit 3, rewind-on-close, compression
+		 19 = /dev/zqtf3	Unit 3, rewind-on-close, compression
 		 20 = /dev/nzqft0	Unit 0, no rewind-on-close, compression
 		 21 = /dev/nzqft1	Unit 1, no rewind-on-close, compression
 		 22 = /dev/nzqft2	Unit 2, no rewind-on-close, compression
@@ -546,10 +579,10 @@
 		 33 = /dev/rawqft1	Unit 1, rewind-on-close, no file marks
 		 34 = /dev/rawqft2	Unit 2, rewind-on-close, no file marks
 		 35 = /dev/rawqft3	Unit 3, rewind-on-close, no file marks
-		 32 = /dev/nrawqft0	Unit 0, no rewind-on-close, no file marks
-		 33 = /dev/nrawqft1	Unit 1, no rewind-on-close, no file marks
-		 34 = /dev/nrawqft2	Unit 2, no rewind-on-close, no file marks
-		 35 = /dev/nrawqft3	Unit 3, no rewind-on-close, no file marks
+		 36 = /dev/nrawqft0	Unit 0, no rewind-on-close, no file marks
+		 37 = /dev/nrawqft1	Unit 1, no rewind-on-close, no file marks
+		 38 = /dev/nrawqft2	Unit 2, no rewind-on-close, no file marks
+		 39 = /dev/nrawqft3	Unit 3, no rewind-on-close, no file marks
     block	Third Matsushita (Panasonic/SoundBlaster) CD-ROM
 		  0 = /dev/sbpcd8	Panasonic CD-ROM controller 2 unit 0
 		  1 = /dev/sbpcd9	Panasonic CD-ROM controller 2 unit 1
@@ -564,7 +597,7 @@
     char	Atari SLM ACSI laser printer (68k/Atari)
 		  0 = /dev/slm0		First SLM laser printer
 		  1 = /dev/slm1		Second SLM laser printer
-		      ...
+		    ...
     block	Fourth Matsushita (Panasonic/SoundBlaster) CD-ROM
 		  0 = /dev/sbpcd12	Panasonic CD-ROM controller 3 unit 0
 		  1 = /dev/sbpcd13	Panasonic CD-ROM controller 3 unit 1
@@ -574,7 +607,7 @@
 		  0 = /dev/ada		First ACSI disk whole disk
 		 16 = /dev/adb		Second ACSI disk whole disk
 		 32 = /dev/adc		Third ACSI disk whole disk
-		      ...
+		    ...
 		240 = /dev/adp		16th ACSI disk whole disk
 
 		Partitions are handled in the same way as for IDE
@@ -584,8 +617,8 @@
  29 char	Universal frame buffer
 		  0 = /dev/fb0		First frame buffer
 		 32 = /dev/fb1		Second frame buffer
-		      ...
-		240 = /dev/fb7		Eighth frame buffer
+		    ...
+		224 = /dev/fb7		Eighth frame buffer
 
 		All additional minor numbers are reserved.
 
@@ -619,13 +652,13 @@
 		      ...
 		  7 = /dev/rom7		Eighth ROM card (rw)
 		  8 = /dev/rrom0	First ROM card (ro)
-		      ...
+		    ...
 		 15 = /dev/rrom7	Eighth ROM card (ro)
 		 16 = /dev/flash0	First flash memory card (rw)
-		      ...
+		    ...
 		 23 = /dev/flash7	Eighth flash memory card (rw)
 		 24 = /dev/rflash0	First flash memory card (ro)
-		      ...
+		    ...
 		 31 = /dev/rflash7	Eighth flash memory card (ro)
 
 		The read-write (rw) devices support back-caching
@@ -636,14 +669,14 @@
  32 char	Specialix serial card
 		  0 = /dev/ttyX0	First Specialix port
 		  1 = /dev/ttyX1	Second Specialix port
-		      ...
+		    ...
     block	Philips LMS CM-206 CD-ROM
 		  0 = /dev/cm206cd	Philips LMS CM-206 CD-ROM
 
  33 char	Specialix serial card - alternate devices
-		  0 = /dev/cux0		Callout device corresponding to ttyX0
-		  1 = /dev/cux1		Callout device corresponding to ttyX1
-		      ...
+		  0 = /dev/cux0		Callout device for ttyX0
+		  1 = /dev/cux1		Callout device for ttyX1
+		    ...
     block	Third IDE hard disk/CD-ROM interface
 		  0 = /dev/hde		Master: whole disk (or CD-ROM)
 		 64 = /dev/hdf		Slave: whole disk (or CD-ROM)
@@ -656,7 +689,7 @@
 		  1 = /dev/scc1		First Z8530, second port
 		  2 = /dev/scc2		Second Z8530, first port
 		  3 = /dev/scc3		Second Z8530, second port
-		      ...
+		    ...
 
 		In a previous version these devices were named
 		/dev/sc1 for /dev/scc0, /dev/sc2 for /dev/scc1, and so
@@ -688,17 +721,25 @@
  36 char	Netlink support
 		  0 = /dev/route	Routing, device updates, kernel to user
 		  1 = /dev/skip		enSKIP security cache control
+		  3 = /dec/fwmonitor	Firewall packet copies
+		 16 = /dev/tap0		First Ethertap device
+		    ...
+		 31 = /dev/tap15	16th Ethertap device
     block	MCA ESDI hard disk
 		  0 = /dev/eda		First ESDI disk whole disk
 		 64 = /dev/edb		Second ESDI disk whole disk
-		      ...
+		    ...
 
 		Partitions are handled in the same way as IDE disks
 		(see major number 3).
 
  37 char	IDE tape
 		  0 = /dev/ht0		First IDE tape
+		  1 = /dev/ht1		Second IDE tape
+		    ...
 		128 = /dev/nht0		First IDE tape, no rewind-on-close
+		129 = /dev/nht1		Second IDE tape, no rewind-on-close
+		    ...
 
 		Currently, only one IDE tape drive is supported.
 
@@ -708,7 +749,7 @@
  38 char	Myricom PCI Myrinet board
 		  0 = /dev/mlanai0	First Myrinet board
 		  1 = /dev/mlanai1	Second Myrinet board
-		      ...
+		    ...
 
 		This device is used for status query, board control
 		and "user level packet I/O."  This board is also
@@ -719,7 +760,7 @@
  39 char	ML-16P experimental I/O board
 		  0 = /dev/ml16pa-a0	First card, first analog channel
 		  1 = /dev/ml16pa-a1	First card, second analog channel
-		      ...
+		    ...
 		 15 = /dev/ml16pa-a15	First card, 16th analog channel
 		 16 = /dev/ml16pa-d	First card, digital lines
 		 17 = /dev/ml16pa-c0	First card, first counter/timer
@@ -727,7 +768,7 @@
 		 19 = /dev/ml16pa-c2	First card, third counter/timer
 		 32 = /dev/ml16pb-a0	Second card, first analog channel
 		 33 = /dev/ml16pb-a1	Second card, second analog channel
-		      ...
+		    ...
 		 47 = /dev/ml16pb-a15	Second card, 16th analog channel
 		 48 = /dev/ml16pb-d	Second card, digital lines
 		 49 = /dev/ml16pb-c0	Second card, first counter/timer
@@ -771,12 +812,12 @@
 
  43 char	isdn4linux virtual modem
 		  0 = /dev/ttyI0	First virtual modem
-		      ...
+		    ...
 		 63 = /dev/ttyI63	64th virtual modem
     block	Network block devices
 		  0 = /dev/nb0		First network block device
 		  1 = /dev/nb1		Second network block device
-		      ...
+		    ...
 
 		Network Block Device is somehow similar to loopback
 		devices: If you read from it, it sends packet accross
@@ -786,14 +827,14 @@
 		the net, implementing block device in userland etc.
 
  44 char	isdn4linux virtual modem - alternate devices
-		  0 = /dev/cui0		Callout device corresponding to ttyI0
-		      ...
-		 63 = /dev/cui63	Callout device corresponding to ttyI63
+		  0 = /dev/cui0		Callout device for ttyI0
+		    ...
+		 63 = /dev/cui63	Callout device for ttyI63
     block	Flash Translatio Layer (FTL) filesystems
 		  0 = /dev/ftla		FTL on first Memory Technology Device
 		 16 = /dev/ftlb		FTL on second Memory Technology Device
 		 32 = /dev/ftlc		FTL on third Memory Technology Device
-		      ...
+		    ...
 		240 = /dev/ftlp		FTL on 16th Memory Technology Device 
 
 		Partitions are handled in the same way as for IDE
@@ -802,14 +843,14 @@
 
  45 char	isdn4linux ISDN BRI driver
 		  0 = /dev/isdn0	First virtual B channel raw data
-		      ...
+		    ...
 		 63 = /dev/isdn63	64th virtual B channel raw data
 		 64 = /dev/isdnctrl0	First channel control/debug
-		      ...
+		    ...
 		127 = /dev/isdnctrl63	64th channel control/debug
 
 		128 = /dev/ippp0	First SyncPPP device
-		      ...
+		    ...
 		191 = /dev/ippp63	64th SyncPPP device
 
 		255 = /dev/isdninfo	ISDN monitor interface
@@ -826,7 +867,7 @@
  46 char	Comtrol Rocketport serial card
 		  0 = /dev/ttyR0	First Rocketport port
 		  1 = /dev/ttyR1	Second Rocketport port
-		      ...
+		    ...
     block	Parallel port ATAPI CD-ROM devices
 		  0 = /dev/pcd0		First parallel port ATAPI CD-ROM
 		  1 = /dev/pcd1		Second parallel port ATAPI CD-ROM
@@ -834,9 +875,9 @@
 		  3 = /dev/pcd3		Fourth parallel port ATAPI CD-ROM
 
  47 char	Comtrol Rocketport serial card - alternate devices
-		  0 = /dev/cur0		Callout device corresponding to ttyR0
-		  1 = /dev/cur1		Callout device corresponding to ttyR1
-		      ...
+		  0 = /dev/cur0		Callout device for ttyR0
+		  1 = /dev/cur1		Callout device for ttyR1
+		    ...
     block	Parallel port ATAPI disk devices
 		  0 = /dev/pf0		First parallel port ATAPI disk
 		  1 = /dev/pf1		Second parallel port ATAPI disk
@@ -849,13 +890,13 @@
  48 char	SDL RISCom serial card
 		  0 = /dev/ttyL0	First RISCom port
 		  1 = /dev/ttyL1	Second RISCom port
-		      ...
+		    ...
     block	Reserved for Mylex DAC960 PCI RAID controller
 
  49 char	SDL RISCom serial card - alternate devices
-		  0 = /dev/cul0		Callout device corresponding to ttyL0
-		  1 = /dev/cul1		Callout device corresponding to ttyL1
-		      ...
+		  0 = /dev/cul0		Callout device for ttyL0
+		  1 = /dev/cul1		Callout device for ttyL1
+		    ...
     block	Reserved for Mylex DAC960 PCI RAID controller
 
  50 char	Reserved for GLINT
@@ -864,7 +905,7 @@
  51 char	Baycom radio modem
 		  0 = /dev/bc0		First Baycom radio modem
 		  1 = /dev/bc1		Second Baycom radio modem
-		      ...
+		    ...
     block	Reserved for Mylex DAC960 PCI RAID controller
 
  52 char	Spellcaster DataComm/BRI ISDN card
@@ -921,7 +962,7 @@
  57 char	Hayes ESP serial card
 		  0 = /dev/ttyP0	First ESP port
 		  1 = /dev/ttyP1	Second ESP port
-		      ...
+		    ...
 
     block	Sixth IDE hard disk/CD-ROM interface
 		  0 = /dev/hdk		Master: whole disk (or CD-ROM)
@@ -931,14 +972,25 @@
 		interface (see major number 3).
 
  58 char	Hayes ESP serial card - alternate devices
-		  0 = /dev/cup0		Callout device corresponding to ttyP0
-		  1 = /dev/cup1		Callout device corresponding to ttyP1
-		      ...
+		  0 = /dev/cup0		Callout device for ttyP0
+		  1 = /dev/cup1		Callout device for ttyP1
+		    ...
     block	Reserved for logical volume manager
 
  59 char	sf firewall package
 		  0 = /dev/firewall	Communication with sf kernel module
 
+    block	Generic PDA filesystem device
+		  0 = /dev/pda0		First PDA device
+		  1 = /dev/pda1		Second PDA device
+		    ...
+
+		The pda devices are used to mount filesystems on
+		remote pda's (basically slow handheld machines with
+		proprietary OS's and limited memory and storage
+		running small fs translation drivers) through serial /
+		IRDA / parallel links.
+
  60-63		LOCAL/EXPERIMENTAL USE
 		Allocated for local/experimental use.  For devices not
 		assigned official numbers, these ranges should be
@@ -972,7 +1024,7 @@
 		  0 = /dev/sdq		16th SCSI disk whole disk
 		 16 = /dev/sdr		17th SCSI disk whole disk
 		 32 = /dev/sds		18th SCSI disk whole disk
-		      ...
+		    ...
 		240 = /dev/sdaf		32nd SCSI disk whole disk
 
 		Partitions are handled in the same way as for IDE
@@ -982,13 +1034,13 @@
  66 char	YARC PowerPC PCI coprocessor card
 		  0 = /dev/yppcpci0	First YARC card
 		  1 = /dev/yppcpci1	Second YARC card
-		      ...
+		    ...
 
     block	SCSI disk devices (32-47)
 		  0 = /dev/sdag		33th SCSI disk whole disk
 		 16 = /dev/sdah		34th SCSI disk whole disk
 		 32 = /dev/sdai		35th SCSI disk whole disk
-		      ...
+		    ...
 		240 = /dev/sdav		48nd SCSI disk whole disk
 
 		Partitions are handled in the same way as for IDE
@@ -1004,7 +1056,7 @@
 		  0 = /dev/sdaw		49th SCSI disk whole disk
 		 16 = /dev/sdax		50th SCSI disk whole disk
 		 32 = /dev/sday		51st SCSI disk whole disk
-		      ...
+		    ...
 		240 = /dev/sdbl		64th SCSI disk whole disk
 
 		Partitions are handled in the same way as for IDE
@@ -1015,7 +1067,7 @@
 		  0 = /dev/capi20	Control device
 		  1 = /dev/capi20.00	First CAPI 2.0 application
 		  2 = /dev/capi20.01	Second CAPI 2.0 application
-		      ...
+		    ...
 		 20 = /dev/capi20.19	19th CAPI 2.0 application
 
 		ISDN CAPI 2.0 driver for use with CAPI 2.0
@@ -1025,7 +1077,7 @@
 		  0 = /dev/sdbm		64th SCSI disk whole disk
 		 16 = /dev/sdbn		65th SCSI disk whole disk
 		 32 = /dev/sdbo		66th SCSI disk whole disk
-		      ...
+		    ...
 		240 = /dev/sdcb		80th SCSI disk whole disk
 
 		Partitions are handled in the same way as for IDE
@@ -1039,7 +1091,7 @@
 		  0 = /dev/sdcc		81st SCSI disk whole disk
 		 16 = /dev/sdcd		82nd SCSI disk whole disk
 		 32 = /dev/sdce		83th SCSI disk whole disk
-		      ...
+		    ...
 		240 = /dev/sdcr		96th SCSI disk whole disk
 
 		Partitions are handled in the same way as for IDE
@@ -1059,7 +1111,7 @@
 		  0 = /dev/sdcs		97th SCSI disk whole disk
 		 16 = /dev/sdct		98th SCSI disk whole disk
 		 32 = /dev/sdcu		99th SCSI disk whole disk
-		      ...
+		    ...
 		240 = /dev/sddh		112nd SCSI disk whole disk
 
 		Partitions are handled in the same way as for IDE
@@ -1069,26 +1121,26 @@
  71 char	Computone IntelliPort II serial card
 		  0 = /dev/ttyF0	IntelliPort II board 0, port 0
 		  1 = /dev/ttyF1	IntelliPort II board 0, port 1
-		      ...
+		    ...
 		 63 = /dev/ttyF63	IntelliPort II board 0, port 63
 		 64 = /dev/ttyF64	IntelliPort II board 1, port 0
 		 65 = /dev/ttyF65	IntelliPort II board 1, port 1
-		      ...
+		    ...
 		127 = /dev/ttyF127	IntelliPort II board 1, port 63
 		128 = /dev/ttyF128	IntelliPort II board 2, port 0
 		129 = /dev/ttyF129	IntelliPort II board 2, port 1
-		      ...
+		    ...
 		191 = /dev/ttyF191	IntelliPort II board 2, port 63
 		192 = /dev/ttyF192	IntelliPort II board 3, port 0
 		193 = /dev/ttyF193	IntelliPort II board 3, port 1
-		      ...
+		    ...
 		255 = /dev/ttyF255	IntelliPort II board 3, port 63
 
     block	SCSI disk devices (112-127)
 		  0 = /dev/sddi		113th SCSI disk whole disk
 		 16 = /dev/sddj		114th SCSI disk whole disk
 		 32 = /dev/sddk		115th SCSI disk whole disk
-		      ...
+		    ...
 		240 = /dev/sddx		128th SCSI disk whole disk
 
 		Partitions are handled in the same way as for IDE
@@ -1096,22 +1148,22 @@
 		partitions is 15.
 
  72 char	Computone IntelliPort II serial card - alternate devices
-		  0 = /dev/cuf0		Callout device corresponding to ttyF0
-		  1 = /dev/cuf1		Callout device corresponding to ttyF1
-		      ...
-		 63 = /dev/cuf63	Callout device corresponding to ttyF63
-		 64 = /dev/cuf64	Callout device corresponding to ttyF64
-		 65 = /dev/cuf65	Callout device corresponding to ttyF65
-		      ...
-		127 = /dev/cuf127	Callout device corresponding to ttyF127
-		128 = /dev/cuf128	Callout device corresponding to ttyF128
-		129 = /dev/cuf129	Callout device corresponding to ttyF129
-		      ...
-		191 = /dev/cuf191	Callout device corresponding to ttyF191
-		192 = /dev/cuf192	Callout device corresponding to ttyF192
-		193 = /dev/cuf193	Callout device corresponding to ttyF193
-		      ...
-		255 = /dev/cuf255	Callout device corresponding to ttyF255
+		  0 = /dev/cuf0		Callout device for ttyF0
+		  1 = /dev/cuf1		Callout device for ttyF1
+		    ...
+		 63 = /dev/cuf63	Callout device for ttyF63
+		 64 = /dev/cuf64	Callout device for ttyF64
+		 65 = /dev/cuf65	Callout device for ttyF65
+		    ...
+		127 = /dev/cuf127	Callout device for ttyF127
+		128 = /dev/cuf128	Callout device for ttyF128
+		129 = /dev/cuf129	Callout device for ttyF129
+		    ...
+		191 = /dev/cuf191	Callout device for ttyF191
+		192 = /dev/cuf192	Callout device for ttyF192
+		193 = /dev/cuf193	Callout device for ttyF193
+		    ...
+		255 = /dev/cuf255	Callout device for ttyF255
 
  73 char	Computone IntelliPort II serial card - control devices
 		  0 = /dev/ip2ipl0	Loadware device for board 0
@@ -1126,7 +1178,7 @@
  74 char	SCI bridge
 		  0 = /dev/SCI/0	SCI device 0
 		  1 = /dev/SCI/1	SCI device 1
-		      ...
+		    ...
 
 		Currently for Dolphin Interconnect Solutions' PCI-SCI
 		bridge.
@@ -1134,16 +1186,16 @@
  75 char	Specialix IO8+ serial card
 		  0 = /dev/ttyW0	First IO8+ port, first card
 		  1 = /dev/ttyW1	Second IO8+ port, first card
-		      ...
+		    ...
 		  8 = /dev/ttyW8	First IO8+ port, second card
-		      ...
+		    ...
 
  76 char	Specialix IO8+ serial card - alternate devices
-		  0 = /dev/cuw0		Callout device corresponding to ttyW0
-		  1 = /dev/cuw1		Callout device corresponding to ttyW1
-		      ...
-		  8 = /dev/cuw8		Callout device corresponding to ttyW8
-		      ...
+		  0 = /dev/cuw0		Callout device for ttyW0
+		  1 = /dev/cuw1		Callout device for ttyW1
+		    ...
+		  8 = /dev/cuw8		Callout device for ttyW8
+		    ...
 
  77 char	ComScire Quantum Noise Generator
 		  0 = /dev/qng		ComScire Quantum Noise Generator
@@ -1151,38 +1203,68 @@
  78 char	PAM Software's multimodem boards
 		  0 = /dev/ttyM0	First PAM modem
 		  1 = /dev/ttyM1	Second PAM modem
-		      ...
+		    ...
 
  79 char	PAM Software's multimodem boards - alternate devices
-		  0 = /dev/cum0		Callout device corresponding to ttyM0
-		  1 = /dev/cum1		Callout device corresponding to ttyM1
-		      ...
+		  0 = /dev/cum0		Callout device for ttyM0
+		  1 = /dev/cum1		Callout device for ttyM1
+		    ...
 
  80 char	Photometrics AT200 CCD camera
 		  0 = /dev/at200	Photometrics AT200 CCD camera
 
+    block	I2O hard disk
+		  0 = /dev/i2o/hda	First I2O hard disk, whole disk
+		 16 = /dev/i2o/hdb	Second I2O hard disk, whole disk
+		    ...
+		240 = /dev/i2o/hdp	16th I2O hard disk, whole disk
+
+		Partitions are handled in the same way as for IDE
+		disks (see major number 3) except that the limit on
+		partitions is 15.
+
  81 char	video4linux
 		  0 = /dev/video0	Video capture/overlay device
-		      ...
+		    ...
 		 63 = /dev/video63	Video capture/overlay device
 		 64 = /dev/radio0	Radio device
-		      ...
+		    ...
 		127 = /dev/radio63	Radio device
 		192 = /dev/vtx0		Teletext device
-		      ...
+		    ...
 		223 = /dev/vtx31	Teletext device
 		224 = /dev/vbi0		Vertical blank interrupt
-		      ...
+		    ...
 		255 = /dev/vbi31	Vertical blank interrupt
 
+    block	I2O hard disk
+		  0 = /dev/i2o/hdq	17th I2O hard disk, whole disk
+		 16 = /dev/i2o/hdr	18th I2O hard disk, whole disk
+		    ...
+		240 = /dev/i2o/hdaf	32nd I2O hard disk, whole disk
+
+		Partitions are handled in the same way as for IDE
+		disks (see major number 3) except that the limit on
+		partitions is 15.
+
  82 char	WiNRADiO communications receiver card
 		  0 = /dev/winradio0	First WiNRADiO card
 		  1 = /dev/winradio1	Second WiNRADiO card
-		      ...
+		    ...
 
 		The driver and documentation may be obtained from
 		http://www.proximity.com.au/~brian/winradio/
 
+    block	I2O hard disk
+		  0 = /dev/i2o/hdag	33rd I2O hard disk, whole disk
+		 16 = /dev/i2o/hdah	34th I2O hard disk, whole disk
+		    ...
+		240 = /dev/i2o/hdav	48th I2O hard disk, whole disk
+
+		Partitions are handled in the same way as for IDE
+		disks (see major number 3) except that the limit on
+		partitions is 15.
+
  83 char	Teletext/videotext interfaces
 		  0 = /dev/vtx		Teletext decoder
 		 16 = /dev/vttuner	TV tuner on teletext interface
@@ -1190,36 +1272,101 @@
 		Devices for the driver contained in the VideoteXt package.
 		More information on http://home.pages.de/~videotext/
 
+    block	I2O hard disk
+		  0 = /dev/i2o/hdaw	49th I2O hard disk, whole disk
+		 16 = /dev/i2o/hdax	50th I2O hard disk, whole disk
+		    ...
+		240 = /dev/i2o/hdbl	64th I2O hard disk, whole disk
+
+		Partitions are handled in the same way as for IDE
+		disks (see major number 3) except that the limit on
+		partitions is 15.
+
  84 char	Ikon 1011[57] Versatec Greensheet Interface
 		  0 = /dev/ihcp0	First Greensheet port
 		  1 = /dev/ihcp1	Second Greensheet port
 
+    block	I2O hard disk
+		  0 = /dev/i2o/hdbm	65th I2O hard disk, whole disk
+		 16 = /dev/i2o/hdbn	66th I2O hard disk, whole disk
+		    ...
+		240 = /dev/i2o/hdcb	80th I2O hard disk, whole disk
+
+		Partitions are handled in the same way as for IDE
+		disks (see major number 3) except that the limit on
+		partitions is 15.
+
  85 char	Linux/SGI shared memory input queue
 		  0 = /dev/shmiq	Master shared input queue
 		  1 = /dev/qcntl0	First device pushed
 		  2 = /dev/qcntl1	Second device pushed
 		    ...
 
+    block	I2O hard disk
+		  0 = /dev/i2o/hdcc	81st I2O hard disk, whole disk
+		 16 = /dev/i2o/hdcd	82nd I2O hard disk, whole disk
+		    ...
+		240 = /dev/i2o/hdcr	96th I2O hard disk, whole disk
+
+		Partitions are handled in the same way as for IDE
+		disks (see major number 3) except that the limit on
+		partitions is 15.
+
  86 char	SCSI media changer
 		  0 = /dev/sch0		First SCSI media changer
 		  1 = /dev/sch1		Second SCSI media changer
 		    ...
 
+    block	I2O hard disk
+		  0 = /dev/i2o/hdcs	97th I2O hard disk, whole disk
+		 16 = /dev/i2o/hdct	98th I2O hard disk, whole disk
+		    ...
+		240 = /dev/i2o/hddh	112th I2O hard disk, whole disk
+
+		Partitions are handled in the same way as for IDE
+		disks (see major number 3) except that the limit on
+		partitions is 15.
+
  87 char	Sony Control-A1 stereo control bus
 		  0 = /dev/controla0	First device on chain
 		  1 = /dev/controla1	Second device on chain
 		    ...
 
+    block	I2O hard disk
+		  0 = /dev/i2o/hddi	113rd I2O hard disk, whole disk
+		 16 = /dev/i2o/hddj	114th I2O hard disk, whole disk
+		    ...
+		240 = /dev/i2o/hddx	128th I2O hard disk, whole disk
+
+		Partitions are handled in the same way as for IDE
+		disks (see major number 3) except that the limit on
+		partitions is 15.
+
  88 char	COMX synchronous serial card
 		  0 = /dev/comx0	COMX channel 0
 		  1 = /dev/comx1	COMX channel 1
 		    ...
 
+    block	Seventh IDE hard disk/CD-ROM interface
+		  0 = /dev/hdm		Master: whole disk (or CD-ROM)
+		 64 = /dev/hdn		Slave: whole disk (or CD-ROM)
+
+		Partitions are handled the same way as for the first
+		interface (see major number 3).
+
+
  89 char	I2C bus interface
 		  0 = /dev/i2c0		First I2C adapter
 		  1 = /dev/i2c1		Second I2C adapter
 		    ...
 
+    block	Eighth IDE hard disk/CD-ROM interface
+		  0 = /dev/hdo		Master: whole disk (or CD-ROM)
+		 64 = /dev/hdp		Slave: whole disk (or CD-ROM)
+
+		Partitions are handled the same way as for the first
+		interface (see major number 3).
+
  90 char	Memory Technology Device (RAM, ROM, Flash)
 		  0 = /dev/mtd0		First MTD (rw)
 		  1 = /dev/mtdr0	First MTD (ro)
@@ -1227,13 +1374,36 @@
 		 30 = /dev/mtd15	16th MTD (rw)
 		 31 = /dev/mtdr15	16th MTD (ro)
 
+    block	Ninth IDE hard disk/CD-ROM interface
+		  0 = /dev/hdq		Master: whole disk (or CD-ROM)
+		 64 = /dev/hdr		Slave: whole disk (or CD-ROM)
+
+		Partitions are handled the same way as for the first
+		interface (see major number 3).
+
  91 char	CAN-Bus devices
 		  0 = /dev/can0		First CAN-Bus controller
 		  1 = /dev/can1		Second CAN-Bus controller
 		    ...
 
+    block	Tenth IDE hard disk/CD-ROM interface
+		  0 = /dev/hds		Master: whole disk (or CD-ROM)
+		 64 = /dev/hdt		Slave: whole disk (or CD-ROM)
+
+		Partitions are handled the same way as for the first
+		interface (see major number 3).
+
  92 char	Reserved for ith Kommunikationstechnik MIC ISDN card
 
+    block	PPDD encrypted disk driver
+		  0 = /dev/ppdd0	First encrypted disk
+		  1 = /dev/ppdd1	Second encrypted disk
+		    ...
+
+		Partitions are handled in the same way as for IDE
+		disks (see major number 3) except that the limit on
+		partitions is 15.
+
  93 char	IBM Smart Capture Card frame grabber
 		  0 = /dev/iscc0	First Smart Capture Card
 		  1 = /dev/iscc1	Second Smart Capture Card
@@ -1242,6 +1412,12 @@
 		129 = /dev/isccctl1	Second Smart Capture Card control
 		    ...
 
+    block	NAND Flash Translation Layer filesystem
+		  0 = /dev/nftla	First NFTL layer
+		 16 = /dev/nftlb	Second NFTL layer
+		    ...
+		240 = /dev/nftlp	16th NTFL layer
+
  94 char	miroVIDEO DC10/30 capture/playback device
 		  0 = /dev/dcxx0	First capture card
 		  1 = /dev/dcxx1	Second capture card
@@ -1253,15 +1429,29 @@
 		  2 = /dev/ipstate	State information log file
 		  3 = /dev/ipauth	Authentication control device/log file
 
+    block	IBM S/390 DASD block storage
+		  0 = /dev/dasd0	First DASD device, major
+		  1 = /dev/dasd0a	First DASD device, block 1
+		  2 = /dev/dasd0b	First DASD device, block 2
+		  3 = /dev/dasd0c	First DASD device, block 3
+		  4 = /dev/dasd1	Second DASD device, major
+		  5 = /dev/dasd1a	Second DASD device, block 1
+		  6 = /dev/dasd1b	Second DASD device, block 2
+		  7 = /dev/dasd1c	Second DASD device, block 3
+		    ...		
+
  96 char	Parallel port ATAPI tape devices
 		  0 = /dev/pt0		First parallel port ATAPI tape
 		  1 = /dev/pt1		Second parallel port ATAPI tape
-		  2 = /dev/pt2		Third parallel port ATAPI tape
-		  3 = /dev/pt3		Fourth parallel port ATAPI tape
+		    ...
 		128 = /dev/npt0		First p.p. ATAPI tape, no rewind
 		129 = /dev/npt1		Second p.p. ATAPI tape, no rewind
-		130 = /dev/npt2		Third p.p. ATAPI tape, no rewind
-		131 = /dev/npt3		Fourth p.p. ATAPI tape, no rewind
+		    ...
+
+    block	IBM S/390 VM/ESA minidisk
+		  0 = /dev/msd0		First VM/ESA minidisk
+		  1 = /dev/msd1		Second VM/ESA minidisk
+		    ...
 
  97 char	Parallel port generic ATAPI interface
 		  0 = /dev/pg0		First parallel port ATAPI device
@@ -1336,7 +1526,64 @@
 		  1 = /dev/srnd1	Second miroMEDIA Surround board
 		    ...
 
-111-119		UNALLOCATED
+111 char	Philips SAA7146-based audio/video card
+		  0 = /dev/av0		First A/V card
+		  1 = /dev/av1		Second A/V card
+		    ...
+
+112 char	ISI serial card
+		  0 = /dev/ttyM0	First ISI port
+		  1 = /dev/ttyM1	Second ISI port
+		    ...
+
+		There is currently a device-naming conflict between
+		these and PAM multimodems (major 78).
+
+113 char	ISI serial card - alternate devices
+		  0 = /dev/cum0		Callout device for ttyM0
+		  1 = /dev/cum1		Callout device for ttyM1
+		    ...
+
+114 char	Picture Elements ISE board
+		  0 = /dev/ise0		First ISE board
+		  1 = /dev/ise1		Second ISE board
+		    ...
+		128 = /dev/isex0	Control node for first ISE board
+		129 = /dev/isex1	Control node for second ISE board
+		    ...
+
+		The ISE board is an embedded computer, optimized for
+		image processing. The /dev/iseN nodes are the general
+		I/O access to the board, the /dev/isex0 nodes command
+		nodes used to control the board.
+
+115 char	Console driver speaker
+		  0 = /dev/speaker	Speaker device file
+
+		Plays music using IBM BASIC style strings.
+
+116 char	Advanced Linux System Driver (ALSA)
+
+117 char	COSA/SRP synchronous serial card
+		  0 = /dev/cosa0c0	1st board, 1st channel
+		  1 = /dev/cosa0c1	1st board, 2nd channel
+		    ...
+		 16 = /dev/cosa1c0	2nd board, 1st channel
+		 17 = /dev/cosa1c1	2nd board, 2nd channel
+		    ...
+
+118 char	Solidum ???
+		  0 = /dev/solnp0
+		  1 = /dev/solnp1
+		    ...
+		128 = /dev/solnpctl0
+		129 = /dev/solnpctl1
+		    ...
+
+119 char	VMware virtual network control
+		  0 = /dev/vnet0	1st virtual network
+		  1 = /dev/vnet1	2nd virtual network
+		    ...
 
 120-127		LOCAL/EXPERIMENTAL USE
 
@@ -1349,13 +1596,285 @@
 136-143 char	Unix98 PTY slaves
 		  0 = /dev/pts/0	First Unix98 pseudo-TTY
 		  1 = /dev/pts/1	Second Unix98 pesudo-TTY
+		    ...
 
 		These device nodes are automatically generated with
 		the proper permissions and modes by mounting the
 		devpts filesystem onto /dev/pts with the appropriate
-		mount options (distribution dependent).
+		mount options (distribution dependent, however, on
+		*most* distributions the appropriate options are
+		"mode=0620,gid=<gid of the "tty" group>".)
+
+144 char	Encapsulated PPP
+		  0 = /dev/pppox0	First PPP over Ethernet
+		    ...
+		 63 = /dev/pppox63	64th PPP over Ethernet
+
+		This is primarily used for ADSL.
+
+		The SST 5136-DN DeviceNet interface driver has been
+		relocated to major 183 due to an unfortunate conflict.
+
+145 char	SAM9407-based soundcard
+		  0 = /dev/sam0_mixer
+		  1 = /dev/sam0_sequencer
+		  2 = /dev/sam0_midi00
+		  3 = /dev/sam0_dsp
+		  4 = /dev/sam0_audio
+		  6 = /dev/sam0_sndstat
+		 18 = /dev/sam0_midi01
+		 34 = /dev/sam0_midi02
+		 50 = /dev/sam0_midi03
+		 64 = /dev/sam1_mixer
+		    ...
+		128 = /dev/sam2_mixer
+		    ...
+		192 = /dev/sam3_mixer
+		    ...
+
+		Device functions match OSS, but offer a number of
+		addons, which are sam9407 specific.  OSS can be
+		operated simultaneously, taking care of the codec.
+
+146 char	SYSTRAM SCRAMNet mirrored-memory network
+		  0 = /dev/scramnet0	First SCRAMNet device
+		  1 = /dev/scramnet1	Second SCRAMNet device
+		    ...
+
+147 char	Aueral Semiconductor Vortex Audio device
+		  0 = /dev/aureal0	First Aureal Vortex
+		  1 = /dev/aureal1	Second Aureal Vortex
+		    ...
+
+148 char	Technology Concepts serial card
+		  0 = /dev/ttyT0	First TCL port
+		  1 = /dev/ttyT1	Second TCL port
+		    ...
+
+149 char	Technology Concepts serial card - alternate devices
+		  0 = /dev/cut0		Callout device for ttyT0
+		  1 = /dev/cut0		Callout device for ttyT1
+		    ...
+
+150 char	Real-Time Linux FIFOs
+		  0 = /dev/rtf0		First RTLinux FIFO
+		  1 = /dev/rtf1		Second RTLinux FIFO
+		    ...
+
+151 char	DPT I2O SmartRaid V controller
+		  0 = /dev/dpti0	First DPT I2O adapter
+		  1 = /dev/dpti1	Second DPT I2O adapter
+		    ...
+
+154 char	Specialix RIO serial card
+		  0 = /dev/ttySR0	First RIO port
+		    ...
+		255 = /dev/ttySR255	256th RIO port
+
+155 char	Specialix RIO serial card - alternate devices
+		  0 = /dev/cusr0	Callout device for ttySR0
+		    ...
+		255 = /dev/cusr255	Callout device for ttySR255
+
+156 char	Specialix RIO serial card
+		  0 = /dev/ttySR256	257th RIO port
+		    ...
+		255 = /dev/ttySR511	512th RIO port
+
+157 char	Specialix RIO serial card - alternate devices
+		  0 = /dev/cusr256	Callout device for ttySR256
+		    ...
+		255 = /dev/cusr511	Callout device for ttySR511
+
+158 char	Dialogic GammaLink fax driver
+		  0 = /dev/gfax0	GammaLink channel 0
+		  1 = /dev/gfax1	GammaLink channel 1
+		    ...
+
+159 char	Quicknet Technologies Internet PhoneJack/LineJack
+		  0 = /dev/ixj0		First device
+		  1 = /dev/ixj1		Second device
+		    ...
+
+160 char	General Purpose Instrument Bus (GPIB)
+		  0 = /dev/gpib0	First GPIB bus
+		  1 = /dev/gpib1	Second GPIB bus
+		    ...
+
+161 char	IrCOMM devices (IrDA serial/parallel emulation)
+		  0 = /dev/ircomm0	First IrCOMM device
+		  1 = /dev/ircomm1	Second IrCOMM device
+		    ...
+		 16 = /dev/irlpt0	First IrLPT device
+		 17 = /dev/irlpt1	Second IrLPT device
+		    ...
+
+162 char	Raw block device interface
+		  0 = /dev/raw		Raw I/O control device
+		  1 = /dev/raw1		First raw I/O device
+		  2 = /dev/raw2		Second raw I/O device
+		    ...
+
+163 char	Radio Tech BIM-XXX-RS232 radio modem
+		  0 = /dev/bimrt0	First BIM radio modem
+		  1 = /dev/bimrt1	Second BIM radio modem
+		    ...
+
+164 char	Chase Research AT/PCI-Fast serial card
+		  0 = /dev/ttyCH0	AT/PCI-Fast board 0, port 0
+		    ...
+		 15 = /dev/ttyCH15	AT/PCI-Fast board 0, port 15
+		 16 = /dev/ttyCH16	AT/PCI-Fast board 1, port 0
+		    ...
+		 31 = /dev/ttyCH31	AT/PCI-Fast board 1, port 15
+		 32 = /dev/ttyCH32	AT/PCI-Fast board 2, port 0
+		    ...
+		 47 = /dev/ttyCH47	AT/PCI-Fast board 2, port 15
+		 48 = /dev/ttyCH48	AT/PCI-Fast board 3, port 0
+		    ...
+		 63 = /dev/ttyCH63	AT/PCI-Fast board 3, port 15
+
+165 char	Chase Research AT/PCI-Fast serial card - alternate devices
+		  0 = /dev/cuch0	Callout device corresponding to ttyCH0
+		    ...
+		 63 = /dev/cuch63	Callout device corresponding to ttyCH63
+
+166 char	ACM USB modems
+		  0 = /dev/ttyACM0	First ACM modem
+		  1 = /dev/ttyACM1	Second ACM modem
+		    ...
+
+167 char	ACM USB modems - alternate devices
+		  0 = /dev/cuacm0	Callout device for ttyACM0
+		  1 = /dev/cuacm1	Callout device for ttyACM1
+		    ...
+
+168 char	Eracom CSA7000 PCI encryption adaptor
+		  0 = /dev/ecsa0	First CSA7000
+		  1 = /dev/ecsa1	Second CSA7000
+		    ...
+
+169 char	Eracom CSA8000 PCI encryption adaptor
+		  0 = /dev/ecsa8-0	First CSA8000
+		  1 = /dev/ecsa8-1	Second CSA8000
+		    ...
 
-144-239		UNALLOCATED
+170 char	AMI MegaRAC remote access controller
+		  0 = /dev/megarac0	First MegaRAC card
+		  1 = /dev/megarac1	Second MegaRAC card
+		    ...
+
+171 char	Reserved for IEEE 1394 (Firewire)
+
+
+172 char	Moxa Intellio serial card
+		  0 = /dev/ttyMX0	First Moxa port
+		  1 = /dev/ttyMX1	Second Moxa port
+		    ...
+		127 = /dev/ttyMX127	128th Moxa port
+		128 = /dev/moxactl	Moxa control port
+
+173 char	Moxa Intellio serial card - alternate devices
+		  0 = /dev/cumx0	Callout device for ttyMX0
+		  1 = /dev/cumx1	Callout device for ttyMX1
+		    ...
+		127 = /dev/cumx127	Callout device for ttyMX127
+
+174 char	SmartIO serial card
+		  0 = /dev/ttySI0	First SmartIO port
+		  1 = /dev/ttySI1	Second SmartIO port
+		    ...
+
+175 char	SmartIO serial card - alternate devices
+		  0 = /dev/cusi0	Callout device for ttySI0
+		  1 = /dev/cusi1	Callout device for ttySI1
+		    ...
+
+176 char	nCipher nFast PCI crypto accelerator
+		  0 = /dev/nfastpci0	First nFast PCI device
+		  1 = /dev/nfastpci1	First nFast PCI device
+		    ...
+
+177 char	TI PCILynx memory spaces
+		  0 = /dev/pcilynx/aux0  AUX space of first PCILynx card
+		    ...
+		 15 = /dev/pcilynx/aux15 AUX space of 16th PCILynx card
+		 16 = /dev/pcilynx/rom0  ROM space of first PCILynx card
+		    ...
+		 31 = /dev/pcilynx/rom15 ROM space of 16th PCILynx card
+		 32 = /dev/pcilynx/ram0  RAM space of first PCILynx card
+		    ...
+		 47 = /dev/pcilynx/ram15 RAM space of 16th PCILynx card
+
+178 char	Giganet cLAN1xxx virtual interface adapter
+		  0 = /dev/clanvi0	First cLAN adapter
+		  1 = /dev/clanvi1	Second cLAN adapter
+		    ...
+
+179 char	CCube DVXChip-based PCI products
+		  0 = /dev/dvxirq0	First DVX device
+		  1 = /dev/dvxirq1	Second DVX device
+		    ...
+
+180 char	USB devices
+		  0 = /dev/usb/lp0	First USB printer
+		    ...
+		 15 = /dev/usb/lp15	16th USB printer
+		 16 = /dev/usb/mouse0	First USB mouse
+		    ...
+		 31 = /dev/usb/mouse15	16th USB mouse
+		 32 = /dev/usb/ez0	First USB firmware loader
+		    ...
+		 47 = /dev/usb/ez15	16th USB firmware loader
+		 48 = /dev/usb/scanner0	First USB scanner
+		    ...
+		 63 = /dev/usb/scanner15 16th USB scanner
+
+181 char	Conrad Electronic parallel port radio clocks
+		  0 = /dev/pcfclock0	First Conrad radio clock
+		  1 = /dev/pcfclock1	Second Conrad radio clock
+		    ...
+
+182 char	Picture Elements THR2 binarizer
+		  0 = /dev/pethr0       First THR2 board
+		  1 = /dev/pethr1	Second THR2 board
+		    ...
+
+183 char	SST 5136-DN DeviceNet interface
+		  0 = /dev/ss5136dn0	First DeviceNet interface
+		  1 = /dev/ss5136dn1	Second DeviceNet interface
+		    ...
+
+		This device used to be assigned to major number 144.
+		It had to be moved due to an unfortunate conflict.
+
+184 char	Picture Elements' video simulator/sender
+		  0 = /dev/pevss0	First sender board
+		  1 = /dev/pevss1	Second sender board
+		    ...
+
+185 char	Reserved for InterMezzo high availability file system
+
+186 char	Object-based storage control device
+		  0 = /dev/obd0		First obd control device
+		  1 = /dev/obd1		Second obd control device
+		    ...
+
+		See ftp://ftp.lustre.org/pub/obd for code and information.
+
+187 char	UNALLOCATED
+
+188 char	USB serial converters
+		  0 = /dev/ttyUSB0	First USB serial converter
+		  1 = /dev/ttyUSB1	Second USB serial converter
+		    ...
+
+189 char	USB serial converters - alternate devices
+		  0 = /dev/cuusb0	Callout device corresponding to ttyUSB0
+		  1 = /dev/cuusb1	Callout device corresponding to ttyUSB1
+		    ...
+
+190-239		UNALLOCATED
 
 240-254		LOCAL/EXPERIMENTAL USE
 
@@ -1384,8 +1903,9 @@
 /dev/stderr	fd/2		symbolic	stderr file descriptor
 /dev/nfsd	socksys		symbolic	Required by iBCS-2
 /dev/X0R	null		symbolic	Required by iBCS-2
+/dev/i2o*	/dev/i2o/*	symbolic	Backward compatibility
 
-Note: the last device is <letter X>-<digit 0>-<letter R>.
+Note: /dev/X0R is <letter X>-<digit 0>-<letter R>.
 
 	Recommended links
 
@@ -1543,3 +2063,4 @@
 in our notation).  This removes the problem of exhausting the
 namespace and enables the kernel to automatically create the device
 nodes for the slaves on demand using the "devpts" filesystem.
+
diff -urN linux-2.2.14-pre14/Documentation/s390/cds.txt linux-2.2.14-pre15/Documentation/s390/cds.txt
--- linux-2.2.14-pre14/Documentation/s390/cds.txt	2003-08-15 15:09:48.000000000 -0700
+++ linux-2.2.14-pre15/Documentation/s390/cds.txt	2003-08-15 15:09:49.000000000 -0700
@@ -10,7 +10,7 @@
 Introduction
 
 This document describes the common device support routines for Linux/390.
-Different than other hardware architectures, ESA/390 hasdefined a unified
+Different than other hardware architectures, ESA/390 has defined a unified
 I/O access method. This gives relief to the device drivers as they don't
 have to deal with different bus types, polling versus interrupt
 processing, shared versus non-shared interrupt processing, DMA versus port
diff -urN linux-2.2.14-pre14/Documentation/telephony/ixj.txt linux-2.2.14-pre15/Documentation/telephony/ixj.txt
--- linux-2.2.14-pre14/Documentation/telephony/ixj.txt	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.2.14-pre15/Documentation/telephony/ixj.txt	2003-08-15 15:09:49.000000000 -0700
@@ -0,0 +1,406 @@
+Linux Quicknet-Drivers-Howto
+Quicknet Technologies, Inc. (www.quicknet.net)
+Version 0.3.4  December 18, 1999
+
+1.0  Introduction
+
+This document describes the first GPL release version of the Linux
+driver for the Quicknet Internet PhoneJACK and Internet LineJACK
+cards.  More information about these cards is available at
+www.quicknet.net.  The driver version discussed in this document is
+0.3.4.
+
+These cards offer nice telco style interfaces to use your standard
+telephone/key system/PBX as the user interface for VoIP applications.
+The Internet LineJACK also offers PSTN connectivity for a single line
+Internet to PSTN gateway.  Of course, you can add more than one card
+to a system to obtain multi-line functionality.  At this time, the
+driver supports the POTS port on both the Internet PhoneJACK and the
+Internet LineJACK, but the PSTN port on the latter card is not yet
+supported.
+
+This document, and the drivers for the cards, are intended for a
+limited audience that includes technically capable programmers who
+would like to experiment with Quicknet cards.  The drivers are
+considered in ALPHA status and are not yet considered stable enough
+for general, widespread use in an unlimited audience.
+
+That's worth saying again:
+
+THE LINUX DRIVERS FOR QUICKNET CARDS ARE PRESENTLY IN A ALPHA STATE
+AND SHOULD NOT BE CONSIDERED AS READY FOR NORMAL WIDESPREAD USE.
+
+They are released early in the spirit of Internet development and to
+make this technology available to innovators who would benefit from
+early exposure.
+
+When we promote the device driver to "beta" level it will be
+considered ready for non-programmer, non-technical users.  Until then,
+please be aware that these drivers may not be stable and may affect
+the performance of your system.
+
+
+1.1 Latest Additions/Improvements
+
+The 0.3.4 version of the driver is the first GPL release.  Several
+features had to be removed from the prior binary only module, mostly
+for reasons of Intellectual Property rights.  We can't release
+information that is not ours - so certain aspects of the driver had to
+be removed to protect the rights of others.  
+
+Specifically, very old Internet PhoneJACK cards have non-standard
+G.723.1 codecs (due to the early nature of the DSPs in those days).
+The auto-conversion code to bring those cards into compliance with
+todays standards is available as a binary only module to those people
+needing it.  If you bought your card after 1997 or so, you are OK -
+it's only the very old cards that are affected.
+
+Also, the code to download G.728/G.729/G.729a codecs to the DSP is
+available as a binary only module as well.  This IP is not ours to
+release.  
+
+Hooks are built into the GPL driver to allow it to work with other
+companion modules that are completely separate from this module.
+
+1.2 Copyright, Trademarks, Disclaimer, & Credits 
+
+Copyright
+
+Copyright (c) 1999 Quicknet Technologies, Inc.  Permission is granted
+to freely copy and distribute this document provided you preserve it
+in its original form. For corrections and minor changes contact the
+maintainer at linux@quicknet.net.
+
+Trademarks
+
+Internet PhoneJACK and Internet LineJACK are registered trademarks of
+Quicknet Technologies, Inc.
+
+Disclaimer
+
+Much of the info in this HOWTO is early information released by
+Quicknet Technologies, Inc. for the express purpose of allowing early
+testing and use of the Linux drivers developed for their products.
+While every attempt has been made to be thorough, complete and
+accurate, the information contained here may be unreliable and there
+are likely a number of errors in this document. Please let the
+maintainer know about them. Since this is free documentation, it
+should be obvious that neither I nor previous authors can be held
+legally responsible for any errors.
+
+Credits
+
+This HOWTO was written by:
+
+	Greg Herlein <gherlein@quicknet.net>
+	Ed Okerson <eokerson@quicknet.net> 
+
+1.3  Future Plans: You Can Help 
+
+Please let the maintainer know of any errors in facts, opinions,
+logic, spelling, grammar, clarity, links, etc.  But first, if the date
+is over a month old, check to see that you have the latest
+version. Please send any info that you think belongs in this document.
+
+You can also contribute code and/or bug-fixes for the sample
+applications.
+
+
+1.4  Where to get things
+
+You can download the latest versions of the driver from:
+
+http://www.quicknet.net/develop.htm
+
+You can download the latest version of this document from:
+
+http://www.quicknet.net/develop.htm
+
+
+1.5  Mailing List
+
+Quicknet operates a mailing list to provide a public forum on using
+these drivers.
+
+To subscribe to the linux-sdk mailing list, send an email to:
+
+   majordomo@linux.quicknet.net
+
+In the body of the email, type:
+
+   subscribe linux-sdk <your-email-address>
+
+Please delete any signature block that you would normally add to the
+bottom of your email - it tends to confuse majordomo.
+
+To send mail to the list, address your mail to 
+
+   linux-sdk@linux.quicknet.net
+
+Your message will go out to everyone on the list.
+
+To unsubscribe to the linux-sdk mailing list, send an email to:
+
+   majordomo@linux.quicknet.net
+
+In the body of the email, type:
+
+   unsubscribe linux-sdk <your-email-address>
+
+
+
+2.0  Requirements
+
+2.1  Quicknet Card(s)
+
+You will need at least one Internet PhoneJACK or Internet LineJACK
+cards.  These are ISA or PCI bus devices that use Plug-n-Play for
+configuration, and use no IRQs.  The driver will support up to 16
+cards in any one system, of any mix between the two types.
+
+Note that you will need two cards to do any useful testing alone, since
+you will need a card on both ends of the connection.  Of course, if
+you are doing collaborative work, perhaps your friends or coworkers
+have cards too.  If not, we'll gladly sell them some!
+
+
+2.2  ISAPNP
+
+Since the Quicknet cards are Plug-n-Play devices, you will need the
+isapnp tools package to configure the cards, or you can use the isapnp
+module to autoconfigure them.  The former package probably came with
+your Linux distribution.  Documentation on this package is available
+online at:
+
+http://mailer.wiwi.uni-marburg.de/linux/LDP/HOWTO/Plug-and-Play-HOWTO.html
+
+The isapnp autoconfiguration is available on the Quicknet website at:
+
+    http://www.quicknet.net/develop.htm
+
+though it may be in the kernel by the time you read this.
+
+
+3.0  Card Configuration 
+
+If you did not get your drivers as part of the linux kernel, do the
+following to install them:
+
+   a.  untar the distribution file.  We use the following command:
+        tar -xvzf ixj-0.x.x.tgz
+
+This creates a subdirectory holding all the necessary files.  Go to that
+subdirectory.
+
+   b.  run the "ixj_dev_create" script to remove any stray device
+files left in the /dev directory, and to create the new officially
+designated device files.  Note that the old devices were called 
+/dev/ixj, and the new method uses /dev/phone.  
+
+   c.  type "make;make install" - this will compile and install the
+module.
+
+   d.  type "depmod -av" to rebuild all your kernel version dependencies.
+
+   e.  if you are using the isapnp module to configure the cards
+       automatically, then skip to step f.  Otherwise, ensure that you
+       have run the isapnp configuration utility to properly configure
+       the cards.
+
+       e1. The Internet PhoneJACK has one configuration register that
+           requires 16 IO ports.  The Internet LineJACK card has two
+           configuration registers and isapnp reports that IO 0
+           requires 16 IO ports and IO 1 requires 8.  The Quicknet
+           driver assumes that these registers are configured to be
+           contiguous, i.e. if IO 0 is set to 0x340 then IO 1 should
+           be set to 0x350.
+
+           Make sure that none of the cards overlap if you have
+           multiple cards in the system.
+
+           If you are new to the isapnp tools, you can jumpstart
+           yourself by doing the following:
+
+      e2.  go to the /etc directory and run pnpdump to get a blank
+           isapnp.conf file.
+
+	   	pnpdump > /etc/isapnp.conf
+
+      e3.  edit the /etc/isapnp.conf file to set the IO warnings and
+           the register IO addresses. The IO warnings means that you
+           should find the line in the file that looks like this:
+
+	   (CONFLICT (IO FATAL)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) # or WARNING
+
+	   and you should edit the line to look like this:
+
+	   (CONFLICT (IO WARNING)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) #
+	   or WARNING
+
+           The next step is to set the IO port addresses.  The issue
+           here is that isapnp does not identify all of the ports out
+           there.  Specifically any device that does not have a driver
+           or module loaded by Linux will not be registered.  This
+           includes older sound cards and network cards.  We have
+           found that the IO port 0x300 is often used even though
+           isapnp claims that no-one is using those ports.  We
+           recommend that for a single card installation that port
+           0x340 (and 0x350) be used.  The IO port line should change
+           from this:
+
+	   (IO 0 (SIZE 16) (BASE 0x0300) (CHECK))
+
+	   to this:
+
+	   (IO 0 (SIZE 16) (BASE 0x0340) )
+
+       e4.  if you have multiple Quicknet cards, make sure that you do
+            not have any overlaps.  Be especially careful if you are
+            mixing Internet PhoneJACK and Internet LineJACK cards in
+            the same system.  In these cases we recommend moving the
+            IO port addresses to the 0x400 block.  Please note that on
+            a few machines the 0x400 series are used.  Feel free to
+            experiment with other addresses.  Our cards have been
+            proven to work using IO addresses of up to 0xFF0.
+
+       e5.  the last step is to uncomment the activation line so the
+            drivers will be associated with the port.  This means the
+            line (immediately below) the IO line should go from this:
+
+            # (ACT Y)
+
+            to this:
+
+	    (ACT Y)
+
+            Once you have finished editing the isapnp.conf file you
+            must submit it into the pnp driverconfigure the cards.
+            This is done using the following command:
+
+	    isapnp isapnp.conf
+
+	    If this works you should see a line that identifies the
+            Quicknet device, the IO port(s) chosen, and a message
+            "Enabled OK".
+
+   f.  if you are loading the module by hand, use insmod.  An example
+of this would look like this:
+
+	insmod phonedev
+	insmod ixj dspio=0x320,0x310 xio=0,0x330
+
+Then verify the module loaded by running lsmod. If you are not using a
+module that matches your kernel version, you may need to "force" the
+load using the -f option in the insmod command.
+
+	insmod phonedev
+	insmod -f ixj dspio=0x320,0x310 xio=0,0x330
+
+
+If you are using isapnp to autoconfigure your card, then you do NOT
+need any of the above, though you need to use depmod to load the
+driver, like this:
+
+	depmod ixj
+
+which will result in the needed drivers getting loaded automatically.
+
+   g.  if you are planning on using kerneld to automatically load the 
+module for you, then you need to edit /etc/conf.modules and add the 
+following lines:
+
+	options ixj dspio=0x340 xio=0x330 ixjdebug=0
+
+If you do this, then when you execute an application that uses the
+module kerneld will load the module for you.  Note that to do this,
+you need to have your kernel set to support kerneld.  You can check
+for this by looking at /usr/src/linux/.config and you should see this:
+
+	# Loadable module support
+	#
+	<snip>
+	CONFIG_KMOD=y
+
+  h.  if you want non-root users to be able to read and write to the 
+ixj devices (this is a good idea!) you should do the following:
+
+     - decide upon a group name to use and create that group if 
+       needed.  Add the user names to that group that you wish to 
+       have access to the device.  For example, we typically will
+       create a group named "ixj" in /etc/group and add all users
+       to that group that we want to run software that can use the 
+       ixjX devices.
+
+     - change the permissions on the device files, like this:
+	
+       chgrp ixj /dev/ixj*	
+       chmod 660 /dev/ixj*
+	
+Once this is done, then non-root users should be able to use the
+devices.  If you have enabled autoloading of modules, then the user
+should be able to open the device and have the module loaded
+automatically for them.
+
+
+4.0 Driver Installation problems.
+
+We have tested these drivers on the 2.2.9, 2.2.10, 2.2.12, and 2.2.13 kernels
+and in all cases have eventually been able to get the drivers to load and 
+run.  We have found four types of problems that prevent this from happening.
+The problems and solutions are:
+
+  a. A step was missed in the installation.  Go back and use section 3
+as a checklist.  Many people miss running the ixj_dev_create script and thus
+never load the device names into the filesystem.
+
+  b. The kernel is inconsistently linked.  We have found this problem in
+the Out Of the Box installation of several distributions.  The symptoms 
+are that neither driver will load, and that the unknown symbols include "jiffy"
+and "kmalloc".  The solution is to recompile both the kernel and the
+modules.  The command string for the final compile looks like this:
+
+    In the kernel directory:
+    1.  cp .config /tmp
+    2.  make mrproper
+    3.  cp /tmp/.config .
+    4.	make dep;make clean;make bzImage;make modules;make modules_install
+
+This rebuilds both the kernel and all the modules and makes sure they all 
+have the same linkages.  This generally solves the problem once the new 
+kernel is installed and the system rebooted.
+
+  c. The kernel has been patched, then unpatched.  This happens when
+someone decides to use an earlier kernel after they load a later kernel.
+The symptoms are proceeding through all three above steps and still not
+being able to load the driver.  What has happened is that the generated
+header files are out of sync with the kernel itself.  The solution is
+to recompile (again) using "make mrproper".  This will remove and then
+regenerate all the necessary header files.  Once this is done, then you 
+need to install and reboot the kernel.  We have not seen any problem
+loading one of our drivers after this treatment.
+
+5.0  Known Limitations
+
+We cannot currently play "dial-tone" and listen for DTMF digits at the
+same time using the ISA PhoneJACK.  This is a bug in the 8020 DSP chip
+used on that product.  All other Quicknet products function normally
+in this regard.  We have a work-around, but it's not done yet.  Until
+then, if you want dial-tone, you can always play a recorded dial-tone
+sound into the audio until you have gathered the DTMF digits.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -urN linux-2.2.14-pre14/drivers/block/ide-disk.c linux-2.2.14-pre15/drivers/block/ide-disk.c
--- linux-2.2.14-pre14/drivers/block/ide-disk.c	2003-08-15 15:09:48.000000000 -0700
+++ linux-2.2.14-pre15/drivers/block/ide-disk.c	2003-08-15 15:09:49.000000000 -0700
@@ -210,6 +210,17 @@
 int ide_multwrite (ide_drive_t *drive, unsigned int mcount)
 {
 	ide_hwgroup_t	*hwgroup= HWGROUP(drive);
+	
+	/*
+	 *	This may look a bit odd, but remember wrq is a copy of the 
+	 *	request not the original. The pointers are real however so the
+	 *	bh's are not copies. Remember that or bad stuff will happen
+	 *
+	 *	At the point we are called the drive has asked us for the
+	 *	data, and its our job to feed it, walking across bh boundaries
+	 *	if need be.
+	 */
+	 
 	struct request *rq = &hwgroup->wrq;
 
 	do {
@@ -226,22 +237,42 @@
 			nsect, rq->nr_sectors - nsect);
 #endif
 		spin_lock_irqsave(&io_request_lock, flags);	/* Is this really necessary? */
+		
+		/*
+		 *	Completed ?
+		 */
+		 
 		if ((rq->nr_sectors -= nsect) <= 0)
 		{
 			spin_unlock_irqrestore(&io_request_lock, flags);
 			break;
 		}
+		
+		/*
+		 *	Take off the sectors transferred
+		 */
+		 
 		if ((rq->current_nr_sectors -= nsect) == 0) {
+			/*
+			 *	If there are no sectors left then move on to
+			 *	the next buffer.
+			 */
 			if ((rq->bh = rq->bh->b_reqnext) != NULL) {
 				rq->current_nr_sectors = rq->bh->b_size>>9;
 				rq->buffer             = rq->bh->b_data;
 			} else {
+				/*
+				 *	Excuse me boss.. nr_sectors doesnt tally
+				 *	deep crap
+				 */
 				spin_unlock_irqrestore(&io_request_lock, flags);
-				printk("%s: buffer list corrupted\n", drive->name);
+				printk("%s: buffer list corrupted (%d, %d, %d)\n", drive->name,
+					rq->current_nr_sectors, rq->nr_sectors, nsect);
 				ide_end_request(0, hwgroup);
 				return 1;
 			}
 		} else {
+			/* Fix the pointer.. we ate data */
 			rq->buffer += nsect << 9;
 		}
 		spin_unlock_irqrestore(&io_request_lock, flags);
@@ -261,6 +292,10 @@
 
 	if (OK_STAT(stat=GET_STAT(),DRIVE_READY,drive->bad_wstat)) {
 		if (stat & DRQ_STAT) {
+			/*
+			 *	The drive wants data. Remember rq is the copy
+			 *	of the request
+			 */
 			if (rq->nr_sectors) {
 				if (ide_multwrite(drive, drive->mult_count))
 					return ide_stopped;
@@ -268,6 +303,10 @@
 				return ide_started;
 			}
 		} else {
+			/*
+			 *	If the copy has all the blocks completed then
+			 *	we can end the original request.
+			 */
 			if (!rq->nr_sectors) {	/* all done? */
 				rq = hwgroup->rq;
 				for (i = rq->nr_sectors; i > 0;){
@@ -408,6 +447,8 @@
 			 * of data to be written.  If we hit an error (corrupted buffer list)
 			 * in ide_multwrite(), then we need to remove the handler/timer
 			 * before returning.  Fortunately, this NEVER happens (right?).
+			 *
+			 * Except when you get an error it seems...
 			 */
 			hwgroup->wrq = *rq; /* scratchpad */
 			ide_set_handler (drive, &multwrite_intr, WAIT_CMD);
diff -urN linux-2.2.14-pre14/drivers/char/mem.c linux-2.2.14-pre15/drivers/char/mem.c
--- linux-2.2.14-pre14/drivers/char/mem.c	1999-08-09 12:04:57.000000000 -0700
+++ linux-2.2.14-pre15/drivers/char/mem.c	2003-08-15 15:09:49.000000000 -0700
@@ -37,6 +37,9 @@
 #ifdef CONFIG_ISDN
 int isdn_init(void);
 #endif
+#ifdef CONFIG_PHONE
+extern int telephony_init(void);
+#endif
 #ifdef CONFIG_VIDEO_DEV
 extern int videodev_init(void);
 #endif
@@ -682,5 +685,8 @@
 #ifdef CONFIG_VIDEO_DEV
 	videodev_init();
 #endif
+#ifdef CONFIG_PHONE
+	telephony_init();
+#endif
 	return 0;
 }
diff -urN linux-2.2.14-pre14/drivers/Makefile linux-2.2.14-pre15/drivers/Makefile
--- linux-2.2.14-pre14/drivers/Makefile	1999-08-09 12:04:38.000000000 -0700
+++ linux-2.2.14-pre15/drivers/Makefile	2003-08-15 15:09:49.000000000 -0700
@@ -10,7 +10,7 @@
 SUB_DIRS     := block char net misc sound
 MOD_SUB_DIRS := $(SUB_DIRS)
 ALL_SUB_DIRS := $(SUB_DIRS) pci sgi scsi sbus cdrom isdn pnp \
-				macintosh video dio zorro fc4 usb
+				macintosh video dio zorro fc4 usb telephony
 
 ifdef CONFIG_DIO
 SUB_DIRS += dio
@@ -110,6 +110,16 @@
   endif
 endif
 
+ifeq ($(CONFIG_PHONE),y)
+SUB_DIRS += telephony
+MOD_SUB_DIRS += telephony
+else
+  ifeq ($(CONFIG_PHONE),m)
+  MOD_SUB_DIRS += telephony
+  endif
+endif
+
+
 # When MOD_LIST_NAME is set, make will try to add $(MOD_SUB_DIRS).o to
 # modules/MOD_LIST_NAME.  We don't have hamradio.o and Linus
 # sort of insisted on making hamradio/ a subdirectory of drivers/net/.
diff -urN linux-2.2.14-pre14/drivers/net/sdlamain.c linux-2.2.14-pre15/drivers/net/sdlamain.c
--- linux-2.2.14-pre14/drivers/net/sdlamain.c	2003-08-15 15:09:48.000000000 -0700
+++ linux-2.2.14-pre15/drivers/net/sdlamain.c	2003-08-15 15:09:49.000000000 -0700
@@ -440,13 +440,13 @@
 #ifdef CONFIG_WANPIPE_CHDLC
 	case SFID_CHDLC508:
 	case SFID_CHDLC514:
-		if (conf->ft1){		
-			printk(KERN_INFO "%s: Starting FT1 Configurator\n",
-				card->devname);
-			err = wpft1_init(card, conf);
-		}else{
+//		if (conf->ft1){		
+//			printk(KERN_INFO "%s: Starting FT1 Configurator\n",
+//				card->devname);
+//			err = wpft1_init(card, conf);
+//		}else{
 			err = wpc_init(card, conf);
-		}
+//		}
 		break;
 #endif
 
diff -urN linux-2.2.14-pre14/drivers/scsi/ips.c linux-2.2.14-pre15/drivers/scsi/ips.c
--- linux-2.2.14-pre14/drivers/scsi/ips.c	1999-10-19 17:14:01.000000000 -0700
+++ linux-2.2.14-pre15/drivers/scsi/ips.c	2003-08-15 15:09:50.000000000 -0700
@@ -60,6 +60,12 @@
 /* 0.99.05  - Fix an oops when we get certain passthru commands              */
 /* 1.00.00  - Initial Public Release                                         */
 /*            Functionally equivalent to 0.99.05                             */
+/* 3.60.00  - Bump max commands to 128 for use with ServeRAID firmware 3.60  */
+/*          - Change version to 3.60 to coincide with ServeRAID release      */
+/*            numbering.                                                     */
+/* 3.60.01  - Remove bogus error check in passthru routine                   */
+/* 3.60.02  - Make DCDB direction based on lookup table                      */
+/*          - Only allow one DCDB command to a SCSI ID at a time             */
 /*                                                                           */
 /*****************************************************************************/
 
@@ -111,8 +117,8 @@
 /*
  * DRIVER_VER
  */
-#define IPS_VERSION_HIGH        "1.00"  /* MUST be 4 chars */
-#define IPS_VERSION_LOW         ".00 "  /* MUST be 4 chars */
+#define IPS_VERSION_HIGH        "3.60"  /* MUST be 4 chars */
+#define IPS_VERSION_LOW         ".02 "  /* MUST be 4 chars */
 
 struct proc_dir_entry proc_scsi_ips = {
 #if !defined(PROC_SCSI_IPS)
@@ -170,6 +176,63 @@
 };
 
 /*
+ * Direction table
+ */
+static char ips_command_direction[] = {
+IPS_DATA_NONE, IPS_DATA_NONE, IPS_DATA_IN, IPS_DATA_IN, IPS_DATA_OUT,
+IPS_DATA_IN, IPS_DATA_IN, IPS_DATA_OUT, IPS_DATA_IN, IPS_DATA_UNK,
+IPS_DATA_OUT, IPS_DATA_OUT, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_IN, IPS_DATA_NONE, IPS_DATA_IN, IPS_DATA_IN, IPS_DATA_OUT,
+IPS_DATA_IN, IPS_DATA_OUT, IPS_DATA_NONE, IPS_DATA_NONE, IPS_DATA_OUT,
+IPS_DATA_NONE, IPS_DATA_IN, IPS_DATA_NONE, IPS_DATA_IN, IPS_DATA_OUT,
+IPS_DATA_NONE, IPS_DATA_UNK, IPS_DATA_IN, IPS_DATA_UNK, IPS_DATA_IN,
+IPS_DATA_UNK, IPS_DATA_OUT, IPS_DATA_IN, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_IN, IPS_DATA_IN, IPS_DATA_OUT, IPS_DATA_NONE, IPS_DATA_UNK,
+IPS_DATA_IN, IPS_DATA_OUT, IPS_DATA_OUT, IPS_DATA_OUT, IPS_DATA_OUT,
+IPS_DATA_OUT, IPS_DATA_NONE, IPS_DATA_IN, IPS_DATA_NONE, IPS_DATA_NONE,
+IPS_DATA_IN, IPS_DATA_OUT, IPS_DATA_OUT, IPS_DATA_OUT, IPS_DATA_OUT,
+IPS_DATA_IN, IPS_DATA_OUT, IPS_DATA_IN, IPS_DATA_OUT, IPS_DATA_OUT,
+IPS_DATA_OUT, IPS_DATA_IN, IPS_DATA_IN, IPS_DATA_IN, IPS_DATA_NONE,
+IPS_DATA_UNK, IPS_DATA_NONE, IPS_DATA_NONE, IPS_DATA_NONE, IPS_DATA_UNK,
+IPS_DATA_NONE, IPS_DATA_OUT, IPS_DATA_IN, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_OUT, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_IN, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_NONE, IPS_DATA_NONE, IPS_DATA_UNK, IPS_DATA_IN, IPS_DATA_NONE,
+IPS_DATA_OUT, IPS_DATA_UNK, IPS_DATA_NONE, IPS_DATA_UNK, IPS_DATA_OUT,
+IPS_DATA_OUT, IPS_DATA_OUT, IPS_DATA_OUT, IPS_DATA_OUT, IPS_DATA_NONE,
+IPS_DATA_UNK, IPS_DATA_IN, IPS_DATA_OUT, IPS_DATA_IN, IPS_DATA_IN,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_OUT,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK,
+IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK
+};
+
+/*
  * Function prototypes
  */
 int ips_detect(Scsi_Host_Template *);
@@ -1351,7 +1414,7 @@
        (scb->cmd.basic_io.op_code == DIRECT_CDB_SCATTER_GATHER))
       return (0);
 
-   if (pt->CmdBSize && pt->CmdBuffer) {
+   if (pt->CmdBSize) {
       scb->data_busaddr = VIRT_TO_BUS(scb->scsi_cmd->request_buffer + sizeof(ips_passthru_t));
    } else {
       scb->data_busaddr = 0L;
@@ -1675,8 +1738,10 @@
 
    /* set controller IDs */
    ha->ha_id[0] = IPS_ADAPTER_ID;
-   for (i = 1; i < ha->nbus; i++)
+   for (i = 1; i < ha->nbus; i++) {
       ha->ha_id[i] = ha->conf->init_id[i-1] & 0x1f;
+      ha->dcdb_active[i-1] = 0;
+   }
 
    return (1);
 }
@@ -1696,6 +1761,7 @@
 ips_next(ips_ha_t *ha) {
    ips_scb_t    *scb;
    Scsi_Cmnd    *SC;
+   Scsi_Cmnd    *p;
    int           ret;
 
    DBG("ips_next");
@@ -1768,9 +1834,15 @@
    /*
     * Send "Normal" I/O commands
     */
-   while ((ha->scb_waitlist.head) &&
-          (scb = ips_getscb(ha))) {
-      SC = ips_removeq_wait_head(&ha->scb_waitlist);
+   p = ha->scb_waitlist.head;
+   while ((p) && (scb = ips_getscb(ha))) {
+      if ((p->channel > 0) && (ha->dcdb_active[p->channel-1] & (1 << p->target))) {
+         ips_freescb(ha, scb);
+         p = (Scsi_Cmnd *) p->host_scribble;
+         continue;
+      }
+
+      SC = ips_removeq_wait(&ha->scb_waitlist, p);
 
       SC->result = DID_OK;
       SC->host_scribble = NULL;
@@ -1785,7 +1857,7 @@
       scb->data_len = 0;
       scb->callback = ipsintr_done;
       scb->timeout = ips_cmd_timeout;
-      memset(&scb->cmd, 0, 4);
+      memset(&scb->cmd, 0, 16);
 
       /* copy in the CDB */
       memcpy(scb->cdb, SC->cmnd, SC->cmd_len);
@@ -1843,11 +1915,11 @@
 
       }
 
-      if ((scb->scsi_cmd->request.cmd == READ) && (SC->request_bufflen))
-         scb->dcdb.cmd_attribute |= DATA_IN;
+      scb->dcdb.cmd_attribute |=
+         ips_command_direction[scb->scsi_cmd->cmnd[0]];
 
-      if ((scb->scsi_cmd->request.cmd == WRITE) && (SC->request_bufflen))
-         scb->dcdb.cmd_attribute |= DATA_OUT;
+      if (!scb->dcdb.cmd_attribute & 0x3)
+         scb->dcdb.transfer_length = 0;
 
       if (scb->data_len >= IPS_MAX_XFER) {
          scb->dcdb.cmd_attribute |= TRANSFER_64K;
@@ -1866,16 +1938,25 @@
             scb->scsi_cmd->scsi_done(scb->scsi_cmd);
          }
 
+         if (scb->bus)
+            ha->dcdb_active[scb->bus-1] &= ~(1 << scb->target_id);
+
          ips_freescb(ha, scb);
          break;
       case IPS_SUCCESS_IMM:
          if (scb->scsi_cmd)
             scb->scsi_cmd->scsi_done(scb->scsi_cmd);
+
+         if (scb->bus)
+            ha->dcdb_active[scb->bus-1] &= ~(1 << scb->target_id);
+
          ips_freescb(ha, scb);
          break;
       default:
          break;
       } /* end case */
+
+      p = (Scsi_Cmnd *) p->host_scribble;
    } /* end while */
 }
 
@@ -2277,11 +2358,11 @@
             scb->sg_len = 0;
          }
 
-         if ((scb->scsi_cmd->request.cmd == READ) && (scb->data_len))
-            scb->dcdb.cmd_attribute |= DATA_IN;
+         scb->dcdb.cmd_attribute |=
+            ips_command_direction[scb->scsi_cmd->cmnd[0]];
 
-         if ((scb->scsi_cmd->request.cmd == WRITE) && (scb->data_len))
-            scb->dcdb.cmd_attribute |= DATA_OUT;
+         if (!scb->dcdb.cmd_attribute & 0x3)
+            scb->dcdb.transfer_length = 0;
 
          if (scb->data_len >= IPS_MAX_XFER) {
             scb->dcdb.cmd_attribute |= TRANSFER_64K;
@@ -2317,6 +2398,9 @@
    } /* end if passthru */
 #endif
 
+   if (scb->bus)
+      ha->dcdb_active[scb->bus-1] &= ~(1 << scb->target_id);
+
    /* call back to SCSI layer */
    scb->scsi_cmd->scsi_done(scb->scsi_cmd);
    ips_freescb(ha, scb);
@@ -2341,6 +2425,16 @@
    DBG("ips_map_status");
 
    if (scb->bus) {
+#if IPS_DEBUG >= 10
+      printk(KERN_NOTICE "(%s) Physical device error: %x %x, Sense Key: %x, ASC: %x, ASCQ: %x\n",
+             ips_name,
+             scb->basic_status,
+             scb->extended_status,
+             scb->dcdb.sense_info[2] & 0xf,
+             scb->dcdb.sense_info[12],
+             scb->dcdb.sense_info[13]);
+#endif
+
       /* copy SCSI status and sense data for DCDB commands */
       memcpy(scb->scsi_cmd->sense_buffer, scb->dcdb.sense_info,
              sizeof(scb->scsi_cmd->sense_buffer));
@@ -2687,6 +2781,7 @@
       else
          scb->cmd.dcdb.op_code = DIRECT_CDB_SCATTER_GATHER;
 
+      ha->dcdb_active[scb->bus-1] |= (1 << scb->target_id);
       scb->cmd.dcdb.command_id = IPS_COMMAND_ID(ha, scb);
       scb->cmd.dcdb.dcdb_address = VIRT_TO_BUS(&scb->dcdb);
       scb->cmd.dcdb.reserved = 0;
diff -urN linux-2.2.14-pre14/drivers/scsi/ips.h linux-2.2.14-pre15/drivers/scsi/ips.h
--- linux-2.2.14-pre14/drivers/scsi/ips.h	2003-08-15 15:09:48.000000000 -0700
+++ linux-2.2.14-pre15/drivers/scsi/ips.h	2003-08-15 15:09:50.000000000 -0700
@@ -76,102 +76,102 @@
    #define UDELAY udelay
    #define MDELAY mdelay
 
-   #define verify_area_20(t,a,sz)               (0) /* success */
-   #define PUT_USER                             put_user
-   #define __PUT_USER                           __put_user
-   #define PUT_USER_RET                         put_user_ret
-   #define GET_USER                             get_user
-   #define __GET_USER                           __get_user
-   #define GET_USER_RET                         get_user_ret
+   #define verify_area_20(t,a,sz)       (0) /* success */
+   #define PUT_USER                     put_user
+   #define __PUT_USER                   __put_user
+   #define PUT_USER_RET                 put_user_ret
+   #define GET_USER                     get_user
+   #define __GET_USER                   __get_user
+   #define GET_USER_RET                 get_user_ret
 
 /*
  * Adapter address map equates
  */
-   #define HISR                 0x08    /* Host Interrupt Status Reg   */
-   #define CCSAR                0x10    /* Cmd Channel System Addr Reg */
-   #define CCCR                 0x14    /* Cmd Channel Control Reg     */
-   #define SQHR                 0x20    /* Status Q Head Reg           */
-   #define SQTR                 0x24    /* Status Q Tail Reg           */
-   #define SQER                 0x28    /* Status Q End Reg            */
-   #define SQSR                 0x2C    /* Status Q Start Reg          */
-   #define SCPR                 0x05    /* Subsystem control port reg  */
-   #define ISPR                 0x06    /* interrupt status port reg   */
-   #define CBSP                 0x07    /* CBSP register               */
+   #define HISR                         0x08    /* Host Interrupt Status Reg   */
+   #define CCSAR                        0x10    /* Cmd Channel System Addr Reg */
+   #define CCCR                         0x14    /* Cmd Channel Control Reg     */
+   #define SQHR                         0x20    /* Status Q Head Reg           */
+   #define SQTR                         0x24    /* Status Q Tail Reg           */
+   #define SQER                         0x28    /* Status Q End Reg            */
+   #define SQSR                         0x2C    /* Status Q Start Reg          */
+   #define SCPR                         0x05    /* Subsystem control port reg  */
+   #define ISPR                         0x06    /* interrupt status port reg   */
+   #define CBSP                         0x07    /* CBSP register               */
 
 /*
  * Adapter register bit equates
  */
-   #define GHI                  0x04    /* HISR General Host Interrupt */
-   #define SQO                  0x02    /* HISR Status Q Overflow      */
-   #define SCE                  0x01    /* HISR Status Channel Enqueue */
-   #define SEMAPHORE            0x08    /* CCCR Semaphore Bit          */
-   #define ILE                  0x10    /* CCCR ILE Bit                */
-   #define START_COMMAND        0x101A  /* CCCR Start Command Channel  */
-   #define START_STOP_BIT       0x0002  /* CCCR Start/Stop Bit         */
-   #define RST                  0x80    /* SCPR Reset Bit              */
-   #define EBM                  0x02    /* SCPR Enable Bus Master      */
-   #define EI                   0x80    /* HISR Enable Interrupts      */
-   #define OP                   0x01    /* OP bit in CBSP              */
+   #define GHI                          0x04    /* HISR General Host Interrupt */
+   #define SQO                          0x02    /* HISR Status Q Overflow      */
+   #define SCE                          0x01    /* HISR Status Channel Enqueue */
+   #define SEMAPHORE                    0x08    /* CCCR Semaphore Bit          */
+   #define ILE                          0x10    /* CCCR ILE Bit                */
+   #define START_COMMAND                0x101A  /* CCCR Start Command Channel  */
+   #define START_STOP_BIT               0x0002  /* CCCR Start/Stop Bit         */
+   #define RST                          0x80    /* SCPR Reset Bit              */
+   #define EBM                          0x02    /* SCPR Enable Bus Master      */
+   #define EI                           0x80    /* HISR Enable Interrupts      */
+   #define OP                           0x01    /* OP bit in CBSP              */
 
 /*
  * Adapter Command ID Equates
  */
-   #define GET_LOGICAL_DRIVE_INFO               0x19
-   #define GET_SUBSYS_PARAM                     0x40
-   #define READ_NVRAM_CONFIGURATION             0x38
-   #define RW_NVRAM_PAGE                        0xBC
-   #define IPS_READ                             0x02
-   #define IPS_WRITE                            0x03
-   #define ENQUIRY                              0x05
-   #define FLUSH_CACHE                          0x0A
-   #define NORM_STATE                           0x00
-   #define READ_SCATTER_GATHER                  0x82
-   #define WRITE_SCATTER_GATHER                 0x83
-   #define DIRECT_CDB                           0x04
-   #define DIRECT_CDB_SCATTER_GATHER            0x84
-   #define CONFIG_SYNC                          0x58
-   #define POCL                                 0x30
-   #define GET_ERASE_ERROR_TABLE                0x17
-   #define RESET_CHANNEL                        0x1A
-   #define CSL                                  0xFF
-   #define ADAPT_RESET                          0xFF
+   #define GET_LOGICAL_DRIVE_INFO       0x19
+   #define GET_SUBSYS_PARAM             0x40
+   #define READ_NVRAM_CONFIGURATION     0x38
+   #define RW_NVRAM_PAGE                0xBC
+   #define IPS_READ                     0x02
+   #define IPS_WRITE                    0x03
+   #define ENQUIRY                      0x05
+   #define FLUSH_CACHE                  0x0A
+   #define NORM_STATE                   0x00
+   #define READ_SCATTER_GATHER          0x82
+   #define WRITE_SCATTER_GATHER         0x83
+   #define DIRECT_CDB                   0x04
+   #define DIRECT_CDB_SCATTER_GATHER    0x84
+   #define CONFIG_SYNC                  0x58
+   #define POCL                         0x30
+   #define GET_ERASE_ERROR_TABLE        0x17
+   #define RESET_CHANNEL                0x1A
+   #define CSL                          0xFF
+   #define ADAPT_RESET                  0xFF
 
 /*
  * Adapter Equates
  */
-   #define IPS_MAX_ADAPTERS                     16
-   #define IPS_MAX_IOCTL                        1
-   #define IPS_MAX_IOCTL_QUEUE                  8
-   #define IPS_MAX_QUEUE                        128
-   #define IPS_BLKSIZE                          512
-   #define MAX_SG_ELEMENTS                      17
-   #define MAX_LOGICAL_DRIVES                   8
-   #define MAX_CHANNELS                         3
-   #define MAX_TARGETS                          15
-   #define MAX_CHUNKS                           16
-   #define MAX_CMDS                             64
-   #define IPS_MAX_XFER                         0x10000
-   #define COMP_MODE_HEADS                      128
-   #define COMP_MODE_SECTORS                    32
-   #define NORM_MODE_HEADS                      254
-   #define NORM_MODE_SECTORS                    63
-   #define NVRAM_PAGE5_SIGNATURE                0xFFDDBB99
-   #define MAX_POST_BYTES                       0x02
-   #define MAX_CONFIG_BYTES                     0x02
-   #define GOOD_POST_BASIC_STATUS               0x80
-   #define SEMAPHORE_TIMEOUT                    2000
-   #define IPS_INTR_OFF                         0
-   #define IPS_INTR_ON                          1
-   #define IPS_ADAPTER_ID                       0xF
-   #define IPS_VENDORID                         0x1014
-   #define IPS_DEVICEID                         0x002E
-   #define TIMEOUT_10                           0x10
-   #define TIMEOUT_60                           0x20
-   #define TIMEOUT_20M                          0x30
-   #define STATUS_SIZE                          4
-   #define STATUS_Q_SIZE                        (MAX_CMDS+1) * STATUS_SIZE
-   #define ONE_MSEC                             1
-   #define ONE_SEC                              1000
+   #define IPS_MAX_ADAPTERS             16
+   #define IPS_MAX_IOCTL                1
+   #define IPS_MAX_IOCTL_QUEUE          8
+   #define IPS_MAX_QUEUE                128
+   #define IPS_BLKSIZE                  512
+   #define MAX_SG_ELEMENTS              17
+   #define MAX_LOGICAL_DRIVES           8
+   #define MAX_CHANNELS                 3
+   #define MAX_TARGETS                  15
+   #define MAX_CHUNKS                   16
+   #define MAX_CMDS                     128
+   #define IPS_MAX_XFER                 0x10000
+   #define COMP_MODE_HEADS              128
+   #define COMP_MODE_SECTORS            32
+   #define NORM_MODE_HEADS              254
+   #define NORM_MODE_SECTORS            63
+   #define NVRAM_PAGE5_SIGNATURE        0xFFDDBB99
+   #define MAX_POST_BYTES               0x02
+   #define MAX_CONFIG_BYTES             0x02
+   #define GOOD_POST_BASIC_STATUS       0x80
+   #define SEMAPHORE_TIMEOUT            2000
+   #define IPS_INTR_OFF                 0
+   #define IPS_INTR_ON                  1
+   #define IPS_ADAPTER_ID               0xF
+   #define IPS_VENDORID                 0x1014
+   #define IPS_DEVICEID                 0x002E
+   #define TIMEOUT_10                   0x10
+   #define TIMEOUT_60                   0x20
+   #define TIMEOUT_20M                  0x30
+   #define STATUS_SIZE                  4
+   #define STATUS_Q_SIZE                (MAX_CMDS+1) * STATUS_SIZE
+   #define ONE_MSEC                     1
+   #define ONE_SEC                      1000
 
 /*
  * Adapter Basic Status Codes
@@ -195,24 +195,24 @@
 /*
  * Adapter Extended Status Equates
  */
-   #define SELECTION_TIMEOUT                    0xF0
-   #define DATA_OVER_UNDER_RUN                  0xF2
-   #define EXT_HOST_RESET                       0xF7
-   #define EXT_DEVICE_RESET                     0xF8
-   #define EXT_RECOVERY                         0xFC
-   #define EXT_CHECK_CONDITION                  0xFF
+   #define SELECTION_TIMEOUT            0xF0
+   #define DATA_OVER_UNDER_RUN          0xF2
+   #define EXT_HOST_RESET               0xF7
+   #define EXT_DEVICE_RESET             0xF8
+   #define EXT_RECOVERY                 0xFC
+   #define EXT_CHECK_CONDITION          0xFF
 
 /*
  * Operating System Defines
  */
-   #define OS_WINDOWS_NT                        0x01
-   #define OS_NETWARE                           0x02
-   #define OS_OPENSERVER                        0x03
-   #define OS_UNIXWARE                          0x04
-   #define OS_SOLARIS                           0x05
-   #define OS_OS2                               0x06
-   #define OS_LINUX                             0x07
-   #define OS_FREEBSD                           0x08
+   #define OS_WINDOWS_NT                0x01
+   #define OS_NETWARE                   0x02
+   #define OS_OPENSERVER                0x03
+   #define OS_UNIXWARE                  0x04
+   #define OS_SOLARIS                   0x05
+   #define OS_OS2                       0x06
+   #define OS_LINUX                     0x07
+   #define OS_FREEBSD                   0x08
 
 /*
  * Adapter Command/Status Packet Definitions
@@ -224,11 +224,11 @@
 /*
  * Logical Drive Equates
  */
-   #define OFF_LINE             0x02
-   #define OKAY                 0x03
-   #define FREE                 0x00
-   #define SYS                  0x06
-   #define CRS                  0x24
+   #define OFF_LINE                     0x02
+   #define OKAY                         0x03
+   #define FREE                         0x00
+   #define SYS                          0x06
+   #define CRS                          0x24
 
 /*
  * DCDB Table Equates
@@ -237,8 +237,10 @@
    #define NO_DISCONNECT                0x00
    #define DISCONNECT_ALLOWED           0x80
    #define NO_AUTO_REQUEST_SENSE        0x40
-   #define DATA_IN                      0x01
-   #define DATA_OUT                     0x02
+   #define IPS_DATA_NONE                0x00
+   #define IPS_DATA_UNK                 0x00
+   #define IPS_DATA_IN                  0x01
+   #define IPS_DATA_OUT                 0x02
    #define TRANSFER_64K                 0x08
    #define NOTIMEOUT                    0x00
    #define TIMEOUT10                    0x10
@@ -737,6 +739,7 @@
 
 typedef struct ips_ha {
    u8                 ha_id[MAX_CHANNELS+1];
+   u32                dcdb_active[MAX_CHANNELS];
    u32                io_addr;            /* Base I/O address           */
    u8                 irq;                /* IRQ for adapter            */
    u8                 ntargets;           /* Number of targets          */
diff -urN linux-2.2.14-pre14/drivers/sound/nm256_audioc# linux-2.2.14-pre15/drivers/sound/nm256_audioc#
--- linux-2.2.14-pre14/drivers/sound/nm256_audioc#	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.2.14-pre15/drivers/sound/nm256_audioc#	2003-08-15 15:09:50.000000000 -0700
@@ -0,0 +1,106 @@
+***************
+*** 812,847 ****
+      return 0;
+  }
+  
+- /* See if the signature left by the NM256 BIOS is intact; if so, we use
+-    the associated address as the end of our buffer. */
+  static void
+- nm256_peek_for_sig (struct nm256_info *card, u32 port1addr)
+  {
+-     char *temp = ioremap_nocache (port1addr + card->port1_end - 0x0400, 16);
+      u32 sig;
+  
+      if (temp == NULL) {
+  	printk (KERN_ERR "NM256: Unable to scan for card signature in video RAM\n");
+  	return;
+      }
+-     memcpy_fromio (&sig, temp, sizeof (u32));
+-     if ((sig & 0xffff0000) == 0x4e4d0000) {
+- 	memcpy_fromio (&(card->bufend), temp + 4, sizeof (u32));
+  	printk (KERN_INFO "NM256: Found card signature in video RAM: 0x%x\n",
+- 		card->bufend);
+      }
+  
+      release_region ((unsigned long) temp, 16);
+  }
+  
+- /* Install a driver for the soundcard referenced by PCIDEV. */
+  
+  static int
+  nm256_install(struct pci_dev *pcidev, enum nm256rev rev, char *verstr)
+  {
+      struct nm256_info *card;
+-     u32 port1addr = pcidev->resource[0].start;
+-     u32 port2addr = pcidev->resource[1].start;
+      int x;
+  
+      card = kmalloc (sizeof (struct nm256_info), GFP_KERNEL);
+--- 982,1048 ----
+      return 0;
+  }
+  
++ /* Perform a full reset on the hardware; this is invoked when an APM
++    resume event occurs.  */
++ static void
++ nm256_full_reset (struct nm256_info *card)
++ {
++     nm256_initHw (card);
++     ac97_reset (&(card->mdev));
++ }
++ 
++ /* 
++  * See if the signature left by the NM256 BIOS is intact; if so, we use
++  * the associated address as the end of our audio buffer in the video
++  * RAM.
++  */
++ 
+  static void
++ nm256_peek_for_sig (struct nm256_info *card)
+  {
++     u32 port1offset 
++ 	= card->port[0].physaddr + card->port[0].end_offset - 0x0400;
++     /* The signature is located 1K below the end of video RAM.  */
++     char *temp = ioremap_nocache (port1offset, 16);
++     /* Default buffer end is 5120 bytes below the top of RAM.  */
++     u32 default_value = card->port[0].end_offset - 0x1400;
+      u32 sig;
+  
++     /* Install the default value first, so we don't have to repeatedly
++        do it if there is a problem.  */
++     card->port[0].end_offset = default_value;
++ 
+      if (temp == NULL) {
+  	printk (KERN_ERR "NM256: Unable to scan for card signature in video RAM\n");
+  	return;
+      }
++     sig = readl (temp);
++     if ((sig & NM_SIG_MASK) == NM_SIGNATURE) {
++ 	u32 pointer = readl (temp + 4);
++ 
++ 	/*
++ 	 * If it's obviously invalid, don't use it (the port already has a
++ 	 * suitable default value set).
++ 	 */
++ 	if (pointer != 0xffffffff)
++ 	    card->port[0].end_offset = pointer;
++ 
+  	printk (KERN_INFO "NM256: Found card signature in video RAM: 0x%x\n",
++ 		pointer);
+      }
+  
+      release_region ((unsigned long) temp, 16);
+  }
+  
++ /* 
++  * Install a driver for the PCI device referenced by PCIDEV.
++  * VERSTR is a human-readable version string.
++  */
+  
+  static int
+  nm256_install(struct pci_dev *pcidev, enum nm256rev rev, char *verstr)
+  {
+      struct nm256_info *card;
+      int x;
+  
+      card = kmalloc (sizeof (struct nm256_info), GFP_KERNEL);
diff -urN linux-2.2.14-pre14/drivers/telephony/Config.in linux-2.2.14-pre15/drivers/telephony/Config.in
--- linux-2.2.14-pre14/drivers/telephony/Config.in	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.2.14-pre15/drivers/telephony/Config.in	2003-08-15 15:09:50.000000000 -0700
@@ -0,0 +1,9 @@
+#
+# Telephony device configuration
+#
+mainmenu_option next_comment
+comment 'Telephony Support'
+
+tristate 'Linux telephony support' CONFIG_PHONE
+dep_tristate 'QuickNet Internet LineJack/PhoneJack support' CONFIG_PHONE_IXJ $CONFIG_PHONE
+endmenu
diff -urN linux-2.2.14-pre14/drivers/telephony/ixj.c linux-2.2.14-pre15/drivers/telephony/ixj.c
--- linux-2.2.14-pre14/drivers/telephony/ixj.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.2.14-pre15/drivers/telephony/ixj.c	2003-08-15 15:09:50.000000000 -0700
@@ -0,0 +1,7759 @@
+/*
+ *    ixj.c
+ *
+ *    Device Driver for the Internet PhoneJACK and
+ *    Internet LineJACK Telephony Cards.
+ *
+ *    (c) Copyright 1999 Quicknet Technologies, 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.
+ *
+ * Author:          Ed Okerson, <eokerson@quicknet.net>
+ *    
+ * Contributors:    Greg Herlein, <gherlein@quicknet.net>
+ *                  David W. Erhart, <derhart@quicknet.net>
+ *                  John Sellers, <jsellers@quicknet.net>
+ *                  Mike Preston, <mpreston@quicknet.net>
+ *
+ * Fixes:
+ *
+ * More information about the hardware related to this driver can be found
+ * at our website:    http://www.quicknet.net
+ *
+ */
+
+static char ixj_c_rcsid[] = "$Id: ixj.c,v 3.4 1999/12/16 22:18:36 root Exp root $";
+
+//#define PERFMON_STATS
+#define IXJDEBUG 0
+#define MAXRINGS 5
+
+#include <linux/module.h>
+
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>	/* printk() */
+#include <linux/fs.h>		/* everything... */
+#include <linux/errno.h>	/* error codes */
+#include <linux/malloc.h>
+#include <linux/mm.h>
+#include <linux/ioport.h>
+#include <linux/interrupt.h>
+#include <linux/tqueue.h>
+#include <linux/proc_fs.h>
+#include <linux/poll.h>
+#include <linux/timer.h>
+#include <linux/delay.h>
+#include <linux/pci.h>
+
+#include <asm/io.h>
+#include <asm/segment.h>
+#include <asm/uaccess.h>
+
+#ifdef CONFIG_ISAPNP
+#include "../pnp/pnpio.h"
+#include "../pnp/isapnp.h"
+#endif
+
+#include "ixj.h"
+
+#define TYPE(dev) (MINOR(dev) >> 4)
+#define NUM(dev) (MINOR(dev) & 0xf)
+
+static int ixjdebug = 0;
+static int hertz = HZ;
+static int samplerate = 100;
+
+MODULE_PARM(ixjdebug, "i");
+
+static IXJ ixj[IXJMAX];
+
+static struct timer_list ixj_timer;
+
+int ixj_convert_loaded = 0;
+
+/************************************************************************
+*
+* These are function definitions to allow external modules to register
+* enhanced functionality call backs.
+*
+************************************************************************/
+
+static int Stub(IXJ * J, unsigned long arg)
+{
+	return 0;
+}
+
+static IXJ_REGFUNC ixj_DownloadG729 = &Stub;
+static IXJ_REGFUNC ixj_DownloadTS85 = &Stub;
+static IXJ_REGFUNC ixj_PreRead = &Stub;
+static IXJ_REGFUNC ixj_PostRead = &Stub;
+static IXJ_REGFUNC ixj_PreWrite = &Stub;
+static IXJ_REGFUNC ixj_PostWrite = &Stub;
+static IXJ_REGFUNC ixj_PreIoctl = &Stub;
+static IXJ_REGFUNC ixj_PostIoctl = &Stub;
+
+static void ixj_read_frame(int board);
+static void ixj_write_frame(int board);
+static void ixj_init_timer(void);
+static void ixj_timeout(unsigned long ptr);
+static int read_filters(int board);
+static int LineMonitor(int board);
+static int ixj_fasync(int fd, struct file *, int mode);
+static int ixj_hookstate(int board);
+static int ixj_record_start(int board);
+static void ixj_record_stop(int board);
+static int ixj_play_start(int board);
+static void ixj_play_stop(int board);
+static int ixj_set_tone_on(unsigned short arg, int board);
+static int ixj_set_tone_off(unsigned short, int board);
+static int ixj_play_tone(int board, char tone);
+static int idle(int board);
+static void ixj_ring_on(int board);
+static void ixj_ring_off(int board);
+static void aec_stop(int board);
+static void ixj_ringback(int board);
+static void ixj_busytone(int board);
+static void ixj_dialtone(int board);
+static void ixj_cpt_stop(int board);
+static char daa_int_read(int board);
+static int daa_set_mode(int board, int mode);
+static int ixj_linetest(int board);
+static int ixj_daa_cid_read(int board);
+static void DAA_Coeff_US(int board);
+static void DAA_Coeff_UK(int board);
+static void DAA_Coeff_France(int board);
+static void DAA_Coeff_Germany(int board);
+static void DAA_Coeff_Australia(int board);
+static void DAA_Coeff_Japan(int board);
+static int ixj_init_filter(int board, IXJ_FILTER * jf);
+static int ixj_init_tone(int board, IXJ_TONE * ti);
+static int ixj_build_cadence(int board, IXJ_CADENCE * cp);
+// Serial Control Interface funtions
+static int SCI_Control(int board, int control);
+static int SCI_Prepare(int board);
+static int SCI_WaitHighSCI(int board);
+static int SCI_WaitLowSCI(int board);
+static DWORD PCIEE_GetSerialNumber(WORD wAddress);
+
+/************************************************************************
+CT8020/CT8021 Host Programmers Model
+Host address	Function					Access
+DSPbase +
+0-1		Aux Software Status Register (reserved)		Read Only
+2-3		Software Status Register			Read Only
+4-5		Aux Software Control Register (reserved)	Read Write
+6-7		Software Control Register			Read Write
+8-9		Hardware Status Register			Read Only
+A-B		Hardware Control Register			Read Write
+C-D Host Transmit (Write) Data Buffer Access Port (buffer input)Write Only
+E-F Host Recieve (Read) Data Buffer Access Port (buffer input)	Read Only
+************************************************************************/
+
+extern __inline__ void ixj_read_HSR(int board)
+{
+	ixj[board].hsr.bytes.low = inb_p(ixj[board].DSPbase + 8);
+	ixj[board].hsr.bytes.high = inb_p(ixj[board].DSPbase + 9);
+}
+extern __inline__ int IsControlReady(int board)
+{
+	ixj_read_HSR(board);
+	return ixj[board].hsr.bits.controlrdy ? 1 : 0;
+}
+
+extern __inline__ int IsStatusReady(int board)
+{
+	ixj_read_HSR(board);
+	return ixj[board].hsr.bits.statusrdy ? 1 : 0;
+}
+
+extern __inline__ int IsRxReady(int board)
+{
+	ixj_read_HSR(board);
+	return ixj[board].hsr.bits.rxrdy ? 1 : 0;
+}
+
+extern __inline__ int IsTxReady(int board)
+{
+	ixj_read_HSR(board);
+	return ixj[board].hsr.bits.txrdy ? 1 : 0;
+}
+
+extern __inline__ BYTE SLIC_GetState(int board)
+{
+	IXJ *j = &ixj[board];
+
+	j->pld_slicr.byte = inb_p(j->XILINXbase + 0x01);
+
+	return j->pld_slicr.bits.state;
+}
+
+static BOOL SLIC_SetState(BYTE byState, int board)
+{
+	BOOL fRetVal = FALSE;
+	IXJ *j = &ixj[board];
+
+	// Set the C1, C2, C3 & B2EN signals.
+	switch (byState) {
+	case PLD_SLIC_STATE_OC:
+		j->pld_slicw.bits.c1 = 0;
+		j->pld_slicw.bits.c2 = 0;
+		j->pld_slicw.bits.c3 = 0;
+		j->pld_slicw.bits.b2en = 0;
+		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+		fRetVal = TRUE;
+		break;
+	case PLD_SLIC_STATE_RINGING:
+		j->pld_slicw.bits.c1 = 1;
+		j->pld_slicw.bits.c2 = 0;
+		j->pld_slicw.bits.c3 = 0;
+		j->pld_slicw.bits.b2en = 1;
+		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+		fRetVal = TRUE;
+		break;
+	case PLD_SLIC_STATE_ACTIVE:
+		j->pld_slicw.bits.c1 = 0;
+		j->pld_slicw.bits.c2 = 1;
+		j->pld_slicw.bits.c3 = 0;
+		j->pld_slicw.bits.b2en = 0;
+		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+		fRetVal = TRUE;
+		break;
+	case PLD_SLIC_STATE_OHT:	// On-hook transmit
+
+		j->pld_slicw.bits.c1 = 1;
+		j->pld_slicw.bits.c2 = 1;
+		j->pld_slicw.bits.c3 = 0;
+		j->pld_slicw.bits.b2en = 0;
+		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+		fRetVal = TRUE;
+		break;
+	case PLD_SLIC_STATE_TIPOPEN:
+		j->pld_slicw.bits.c1 = 0;
+		j->pld_slicw.bits.c2 = 0;
+		j->pld_slicw.bits.c3 = 1;
+		j->pld_slicw.bits.b2en = 0;
+		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+		fRetVal = TRUE;
+		break;
+	case PLD_SLIC_STATE_STANDBY:
+		j->pld_slicw.bits.c1 = 1;
+		j->pld_slicw.bits.c2 = 0;
+		j->pld_slicw.bits.c3 = 1;
+		j->pld_slicw.bits.b2en = 1;
+		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+		fRetVal = TRUE;
+		break;
+	case PLD_SLIC_STATE_APR:	// Active polarity reversal
+
+		j->pld_slicw.bits.c1 = 0;
+		j->pld_slicw.bits.c2 = 1;
+		j->pld_slicw.bits.c3 = 1;
+		j->pld_slicw.bits.b2en = 0;
+		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+		fRetVal = TRUE;
+		break;
+	case PLD_SLIC_STATE_OHTPR:	// OHT polarity reversal
+
+		j->pld_slicw.bits.c1 = 1;
+		j->pld_slicw.bits.c2 = 1;
+		j->pld_slicw.bits.c3 = 1;
+		j->pld_slicw.bits.b2en = 0;
+		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+		fRetVal = TRUE;
+		break;
+	default:
+		fRetVal = FALSE;
+		break;
+	}
+
+	return fRetVal;
+}
+
+int ixj_register(int index, IXJ_REGFUNC regfunc)
+{
+	int cnt;
+	int retval = 0;
+	switch (index) {
+	case G729LOADER:
+		ixj_DownloadG729 = regfunc;
+		for (cnt = 0; cnt < IXJMAX; cnt++)
+			ixj_DownloadG729(&ixj[cnt], 0L);
+		break;
+	case TS85LOADER:
+		ixj_DownloadTS85 = regfunc;
+		for (cnt = 0; cnt < IXJMAX; cnt++)
+			ixj_DownloadTS85(&ixj[cnt], 0L);
+		break;
+	case PRE_READ:
+		ixj_PreRead = regfunc;
+		break;
+	case POST_READ:
+		ixj_PostRead = regfunc;
+		break;
+	case PRE_WRITE:
+		ixj_PreWrite = regfunc;
+		break;
+	case POST_WRITE:
+		ixj_PostWrite = regfunc;
+		break;
+	case PRE_IOCTL:
+		ixj_PreIoctl = regfunc;
+		break;
+	case POST_IOCTL:
+		ixj_PostIoctl = regfunc;
+		break;
+	default:
+		retval = 1;
+	}
+	return retval;
+}
+
+int ixj_unregister(int index)
+{
+	int retval = 0;
+	switch (index) {
+	case G729LOADER:
+		ixj_DownloadG729 = &Stub;
+		break;
+	case TS85LOADER:
+		ixj_DownloadTS85 = &Stub;
+		break;
+	case PRE_READ:
+		ixj_PreRead = &Stub;
+		break;
+	case POST_READ:
+		ixj_PostRead = &Stub;
+		break;
+	case PRE_WRITE:
+		ixj_PreWrite = &Stub;
+		break;
+	case POST_WRITE:
+		ixj_PostWrite = &Stub;
+		break;
+	case PRE_IOCTL:
+		ixj_PreIoctl = &Stub;
+		break;
+	case POST_IOCTL:
+		ixj_PostIoctl = &Stub;
+		break;
+	default:
+		retval = 1;
+	}
+	return retval;
+}
+
+void ixj_init_timer(void)
+{
+	init_timer(&ixj_timer);
+	ixj_timer.function = ixj_timeout;
+	ixj_timer.data = (int) NULL;
+	ixj_timer.expires = jiffies + (hertz / samplerate);
+	add_timer(&ixj_timer);
+}
+
+static void ixj_timeout(unsigned long ptr)
+{
+	int board;
+	unsigned long jifon;
+	IXJ *j;
+	IXJ_TONE ti;
+	static int mutex = 0;
+
+	/* What is this trying to do ?? */
+	/* This is a safeguard in case the loop does not complete before the
+	   next timer tick.  Since all the work is done during this timer loop,
+	   we do not want the next iteration of the loop to start before the
+	   last one finished. */
+
+	if (!mutex) {
+		mutex++;
+		for (board = 0; board < IXJMAX; board++) {
+			j = &ixj[board];
+
+			if (j->DSPbase) {
+#ifdef PERFMON_STATS
+				j->timerchecks++;
+#endif
+				if (j->tone_state) {
+
+					if (!ixj_hookstate(board)) {
+						ixj_cpt_stop(board);
+						if (j->m_hook) {
+							j->m_hook = 0;
+							j->ex.bits.hookstate = 1;
+							if (j->async_queue)
+								kill_fasync(j->async_queue, SIGIO);	// Send apps notice of change
+
+						}
+						goto timer_end;
+					}
+					if (j->tone_state == 1)
+						jifon = (hertz * j->tone_on_time * 25 / 100000);
+					else
+						jifon = (hertz * j->tone_on_time * 25 / 100000) +
+						    (hertz * j->tone_off_time * 25 / 100000);
+					if (jiffies < j->tone_start_jif + jifon) {
+						if (j->tone_state == 1) {
+							ixj_play_tone(board, j->tone_index);
+							if (j->dsp.low == 0x20) {
+								goto timer_end;
+							}
+						} else {
+							ixj_play_tone(board, 0);
+							if (j->dsp.low == 0x20) {
+								goto timer_end;
+							}
+						}
+					} else {
+						j->tone_state++;
+						if (j->tone_state == 3) {
+							j->tone_state = 0;
+							if (j->cadence_t) {
+								j->tone_cadence_state++;
+								if (j->tone_cadence_state == j->cadence_t->elements_used) {
+									switch (j->cadence_t->termination) {
+									case PLAY_ONCE:
+										ixj_cpt_stop(board);
+										break;
+									case REPEAT_LAST_ELEMENT:
+										j->tone_cadence_state--;
+										ixj_play_tone(board, j->cadence_t->ce[j->tone_cadence_state].index);
+										break;
+									case REPEAT_ALL:
+										j->tone_cadence_state = 0;
+										if (j->cadence_t->ce[j->tone_cadence_state].freq0) {
+											ti.tone_index = j->cadence_t->ce[j->tone_cadence_state].index;
+											ti.freq0 = j->cadence_t->ce[j->tone_cadence_state].freq0;
+											ti.gain0 = j->cadence_t->ce[j->tone_cadence_state].gain0;
+											ti.freq1 = j->cadence_t->ce[j->tone_cadence_state].freq1;
+											ti.gain1 = j->cadence_t->ce[j->tone_cadence_state].gain1;
+											ixj_init_tone(board, &ti);
+										}
+										ixj_set_tone_on(j->cadence_t->ce[0].tone_on_time, board);
+										ixj_set_tone_off(j->cadence_t->ce[0].tone_off_time, board);
+										ixj_play_tone(board, j->cadence_t->ce[0].index);
+										break;
+									}
+								} else {
+									if (j->cadence_t->ce[j->tone_cadence_state].gain0) {
+										ti.tone_index = j->cadence_t->ce[j->tone_cadence_state].index;
+										ti.freq0 = j->cadence_t->ce[j->tone_cadence_state].freq0;
+										ti.gain0 = j->cadence_t->ce[j->tone_cadence_state].gain0;
+										ti.freq1 = j->cadence_t->ce[j->tone_cadence_state].freq1;
+										ti.gain1 = j->cadence_t->ce[j->tone_cadence_state].gain1;
+										ixj_init_tone(board, &ti);
+									}
+									ixj_set_tone_on(j->cadence_t->ce[j->tone_cadence_state].tone_on_time, board);
+									ixj_set_tone_off(j->cadence_t->ce[j->tone_cadence_state].tone_off_time, board);
+									ixj_play_tone(board, j->cadence_t->ce[j->tone_cadence_state].index);
+								}
+							}
+						}
+						if (j->flags.dialtone) {
+							ixj_dialtone(board);
+						}
+						if (j->flags.busytone) {
+							ixj_busytone(board);
+							if (j->dsp.low == 0x20) {
+								goto timer_end;
+							}
+						}
+						if (j->flags.ringback) {
+							ixj_ringback(board);
+							if (j->dsp.low == 0x20) {
+								goto timer_end;
+							}
+						}
+						if (!j->tone_state) {
+							if (j->dsp.low == 0x20 || (j->play_mode == -1 && j->rec_mode == -1))
+								idle(board);
+							if (j->dsp.low == 0x20 && j->play_mode != -1)
+								ixj_play_start(board);
+							if (j->dsp.low == 0x20 && j->rec_mode != -1)
+								ixj_record_start(board);
+						}
+					}
+				}
+				if (!j->tone_state || j->dsp.low != 0x20) {
+					if (IsRxReady(board)) {
+						ixj_read_frame(board);
+					}
+					if (IsTxReady(board)) {
+						ixj_write_frame(board);
+					}
+				}
+				if (j->flags.cringing) {
+					if (ixj_hookstate(board) & 1) {
+						j->flags.cringing = 0;
+						ixj_ring_off(board);
+					} else {
+						if (jiffies - j->ring_cadence_jif >= (.5 * hertz)) {
+							j->ring_cadence_t--;
+							if (j->ring_cadence_t == -1)
+								j->ring_cadence_t = 15;
+							j->ring_cadence_jif = jiffies;
+						}
+						if (j->ring_cadence & 1 << j->ring_cadence_t) {
+							ixj_ring_on(board);
+						} else {
+							ixj_ring_off(board);
+						}
+						goto timer_end;
+					}
+				}
+				if (!j->flags.ringing) {
+					if (ixj_hookstate(board)) {
+						if (j->dsp.low == 0x21 &&
+						    j->pld_slicr.bits.state != PLD_SLIC_STATE_ACTIVE)
+                // Internet LineJACK
+						 {
+							SLIC_SetState(PLD_SLIC_STATE_ACTIVE, board);
+						}
+						LineMonitor(board);
+						read_filters(board);
+						ixj_WriteDSPCommand(0x511B, board);
+						j->proc_load = j->ssr.high << 8 | j->ssr.low;
+						if (!j->m_hook) {
+							j->m_hook = j->ex.bits.hookstate = 1;
+							if (j->async_queue)
+								kill_fasync(j->async_queue, SIGIO);	// Send apps notice of change
+
+						}
+					} else {
+						if (j->dsp.low == 0x21 &&
+						    j->pld_slicr.bits.state == PLD_SLIC_STATE_ACTIVE)
+                // Internet LineJACK
+						 {
+							SLIC_SetState(PLD_SLIC_STATE_STANDBY, board);
+						}
+						if (j->ex.bits.dtmf_ready) {
+							j->dtmf_wp = j->dtmf_rp = j->ex.bits.dtmf_ready = 0;
+						}
+						if (j->m_hook) {
+							j->m_hook = 0;
+							j->ex.bits.hookstate = 1;
+							if (j->async_queue)
+								kill_fasync(j->async_queue, SIGIO);	// Send apps notice of change
+
+						}
+					}
+				}
+				if (j->cardtype == 300) {
+					if (j->flags.pstn_present) {
+						j->pld_scrr.byte = inb_p(j->XILINXbase);
+						if (jiffies >= j->pstn_sleeptil && j->pld_scrr.bits.daaflag) {
+							daa_int_read(board);
+							if (j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.RING) {
+								if (!j->flags.pstn_ringing) {
+									j->flags.pstn_ringing = 1;
+									if (j->daa_mode != SOP_PU_RINGING)
+										daa_set_mode(board, SOP_PU_RINGING);
+								}
+							}
+							if (j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.VDD_OK) {
+								j->pstn_winkstart = 0;
+								if (j->flags.pstn_ringing && !j->pstn_envelope) {
+									j->ex.bits.pstn_ring = 0;
+									j->pstn_envelope = 1;
+									j->pstn_ring_start = jiffies;
+								}
+							} else {
+								if (j->flags.pstn_ringing && j->pstn_envelope &&
+								    jiffies > j->pstn_ring_start + ((hertz * 15) / 10)) {
+									j->ex.bits.pstn_ring = 1;
+									j->pstn_envelope = 0;
+								} else if (j->daa_mode == SOP_PU_CONVERSATION) {
+									if (!j->pstn_winkstart) {
+										j->pstn_winkstart = jiffies;
+									} else if (jiffies > j->pstn_winkstart + (hertz * j->winktime / 1000)) {
+										daa_set_mode(board, SOP_PU_SLEEP);
+										j->pstn_winkstart = 0;
+										j->ex.bits.pstn_wink = 1;
+									}
+								} else {
+									j->ex.bits.pstn_ring = 0;
+								}
+							}
+							if (j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.Cadence) {
+								if (j->daa_mode == SOP_PU_RINGING) {
+									daa_set_mode(board, SOP_PU_SLEEP);
+									j->flags.pstn_ringing = 0;
+									j->ex.bits.pstn_ring = 0;
+								}
+							}
+							if (j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.Caller_ID) {
+								if (j->daa_mode == SOP_PU_RINGING && j->flags.pstn_ringing) {
+									j->pstn_cid_intr = 1;
+									j->pstn_cid_recieved = jiffies;
+								}
+							}
+						} else {
+							if (j->pld_scrr.bits.daaflag) {
+								daa_int_read(board);
+							}
+							j->ex.bits.pstn_ring = 0;
+							if (j->pstn_cid_intr && jiffies > j->pstn_cid_recieved + (hertz * 3)) {
+								if (j->daa_mode == SOP_PU_RINGING) {
+									ixj_daa_cid_read(board);
+									j->ex.bits.caller_id = 1;
+								}
+								j->pstn_cid_intr = 0;
+							} else {
+								j->ex.bits.caller_id = 0;
+							}
+							if (!j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.VDD_OK) {
+								if (j->flags.pstn_ringing && j->pstn_envelope) {
+									j->ex.bits.pstn_ring = 1;
+									j->pstn_envelope = 0;
+								} else if (j->daa_mode == SOP_PU_CONVERSATION) {
+									if (!j->pstn_winkstart) {
+										j->pstn_winkstart = jiffies;
+									} else if (jiffies > j->pstn_winkstart + (hertz * 320 / 1000)) {
+										daa_set_mode(board, SOP_PU_SLEEP);
+										j->pstn_winkstart = 0;
+										j->ex.bits.pstn_wink = 1;
+									}
+								}
+							}
+						}
+					}
+				}
+				if ((j->ex.bits.f0 || j->ex.bits.f1 || j->ex.bits.f2 || j->ex.bits.f3)
+				    && j->filter_cadence) {
+				}
+				if (j->ex.bytes) {
+					wake_up_interruptible(&j->poll_q);	// Wake any blocked selects
+
+					if (j->async_queue)
+						kill_fasync(j->async_queue, SIGIO);	// Send apps notice of change
+
+				}
+			} else {
+				break;
+			}
+		}
+	}
+      timer_end:
+	if (mutex == 1) {
+		ixj_init_timer();
+		mutex--;
+	}
+}
+
+static int ixj_status_wait(int board)
+{
+	unsigned long jif;
+
+	jif = jiffies;
+	while (!IsStatusReady(board)) {
+		if (jiffies - jif > (60 * (hertz / 100))) {
+			return -1;
+		}
+	}
+	return 0;
+}
+
+int ixj_WriteDSPCommand(unsigned short cmd, int board)
+{
+	BYTES bytes;
+	unsigned long jif;
+
+	bytes.high = (cmd & 0xFF00) >> 8;
+	bytes.low = cmd & 0x00FF;
+	jif = jiffies;
+	while (!IsControlReady(board)) {
+		if (jiffies - jif > (60 * (hertz / 100))) {
+			return -1;
+		}
+	}
+	outb_p(bytes.low, ixj[board].DSPbase + 6);
+	outb_p(bytes.high, ixj[board].DSPbase + 7);
+
+	if (ixj_status_wait(board)) {
+		ixj[board].ssr.low = 0xFF;
+		ixj[board].ssr.high = 0xFF;
+		return -1;
+	}
+/* Read Software Status Register */
+	ixj[board].ssr.low = inb_p(ixj[board].DSPbase + 2);
+	ixj[board].ssr.high = inb_p(ixj[board].DSPbase + 3);
+	return 0;
+}
+
+/***************************************************************************
+*
+*  General Purpose IO Register read routine
+*
+***************************************************************************/
+extern __inline__ int ixj_gpio_read(int board)
+{
+	if (ixj_WriteDSPCommand(0x5143, board))
+		return -1;
+
+	ixj[board].gpio.bytes.low = ixj[board].ssr.low;
+	ixj[board].gpio.bytes.high = ixj[board].ssr.high;
+
+	return 0;
+}
+
+extern __inline__ void LED_SetState(int state, int board)
+{
+	if (ixj[board].dsp.low == 0x21) {
+		ixj[board].pld_scrw.bits.led1 = state & 0x1 ? 1 : 0;
+		ixj[board].pld_scrw.bits.led2 = state & 0x2 ? 1 : 0;
+		ixj[board].pld_scrw.bits.led3 = state & 0x4 ? 1 : 0;
+		ixj[board].pld_scrw.bits.led4 = state & 0x8 ? 1 : 0;
+
+		outb_p(ixj[board].pld_scrw.byte, ixj[board].XILINXbase);
+	}
+}
+
+/*********************************************************************
+*  GPIO Pins are configured as follows on the Quicknet Internet
+*  PhoneJACK Telephony Cards
+* 
+* POTS Select        GPIO_6=0 GPIO_7=0
+* Mic/Speaker Select GPIO_6=0 GPIO_7=1
+* Handset Select     GPIO_6=1 GPIO_7=0
+*
+* SLIC Active        GPIO_1=0 GPIO_2=1 GPIO_5=0
+* SLIC Ringing       GPIO_1=1 GPIO_2=1 GPIO_5=0
+* SLIC Open Circuit  GPIO_1=0 GPIO_2=0 GPIO_5=0
+*
+* Hook Switch changes reported on GPIO_3
+*********************************************************************/
+static int ixj_set_port(int board, int arg)
+{
+	IXJ *j = &ixj[board];
+
+	if (j->cardtype == 400) {
+		if (arg != PORT_POTS)
+			return 10;
+		else
+			return 0;
+	}
+	switch (arg) {
+	case PORT_POTS:
+		j->port = PORT_POTS;
+		switch (j->cardtype) {
+		case 500:
+			j->pld_slicw.pcib.mic = 0;
+			j->pld_slicw.pcib.spk = 0;
+			outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+			break;
+		case 300:
+			if (ixj_WriteDSPCommand(0xC528, board))		/* Write CODEC config to
+									   Software Control Register */
+				return 2;
+			j->pld_scrw.bits.daafsyncen = 0;	// Turn off DAA Frame Sync
+
+			outb_p(j->pld_scrw.byte, j->XILINXbase);
+			j->pld_clock.byte = 0;
+			outb_p(j->pld_clock.byte, j->XILINXbase + 0x04);
+			j->pld_slicw.bits.rly1 = 1;
+			j->pld_slicw.bits.spken = 0;
+			outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+			SLIC_SetState(PLD_SLIC_STATE_STANDBY, board);
+			break;
+		case 100:
+			j->gpio.bytes.high = 0x0B;
+			j->gpio.bits.gpio6 = 0;
+			j->gpio.bits.gpio7 = 0;
+			ixj_WriteDSPCommand(j->gpio.word, board);
+			break;
+		}
+		break;
+	case PORT_PSTN:
+		if (j->cardtype == 300) {
+			ixj_WriteDSPCommand(0xC534, board);	/* Write CODEC config to Software Control Register */
+
+			j->pld_slicw.bits.rly3 = 0;
+			j->pld_slicw.bits.rly1 = 1;
+			j->pld_slicw.bits.spken = 0;
+			outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+			j->port = PORT_PSTN;
+		} else {
+			return 4;
+		}
+		break;
+	case PORT_SPEAKER:
+		j->port = PORT_SPEAKER;
+		switch (j->cardtype) {
+		case 500:
+			j->pld_slicw.pcib.mic = 1;
+			j->pld_slicw.pcib.spk = 1;
+			outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+			break;
+		case 300:
+			break;
+		case 100:
+			j->gpio.bytes.high = 0x0B;
+			j->gpio.bits.gpio6 = 0;
+			j->gpio.bits.gpio7 = 1;
+			ixj_WriteDSPCommand(j->gpio.word, board);
+			break;
+		}
+		break;
+	case PORT_HANDSET:
+		if (j->cardtype == 300 || j->cardtype == 500) {
+			return 5;
+		} else {
+			j->gpio.bytes.high = 0x0B;
+			j->gpio.bits.gpio6 = 1;
+			j->gpio.bits.gpio7 = 0;
+			ixj_WriteDSPCommand(j->gpio.word, board);
+			j->port = PORT_HANDSET;
+		}
+		break;
+	default:
+		return 6;
+		break;
+	}
+	return 0;
+}
+
+static int ixj_set_pots(int board, int arg)
+{
+	IXJ *j = &ixj[board];
+
+	if (j->cardtype == 300) {
+		if (arg) {
+			if (j->port == PORT_PSTN) {
+				j->pld_slicw.bits.rly1 = 0;
+				outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+				return 1;
+			} else {
+				return 0;
+			}
+		} else {
+			j->pld_slicw.bits.rly1 = 1;
+			outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+			return 1;
+		}
+	} else {
+		return 0;
+	}
+}
+
+static void ixj_ring_on(int board)
+{
+	IXJ *j = &ixj[board];
+	if (j->dsp.low == 0x20)	// Internet PhoneJACK
+	 {
+		if (ixjdebug > 0)
+			printk(KERN_INFO "IXJ Ring On /dev/ixj%d\n", board);
+
+		j->gpio.bytes.high = 0x0B;
+		j->gpio.bytes.low = 0x00;
+		j->gpio.bits.gpio1 = 1;
+		j->gpio.bits.gpio2 = 1;
+		j->gpio.bits.gpio5 = 0;
+		ixj_WriteDSPCommand(j->gpio.word, board);	/* send the ring signal */
+	} else			//  Internet LineJACK, Internet PhoneJACK Lite or
+              //  Internet PhoneJACK PCI
+	 {
+		if (ixjdebug > 0)
+			printk(KERN_INFO "IXJ Ring On /dev/phone%d\n", board);
+
+		SLIC_SetState(PLD_SLIC_STATE_RINGING, board);
+	}
+}
+
+static int ixj_hookstate(int board)
+{
+	unsigned long det;
+	IXJ *j = &ixj[board];
+	int fOffHook = 0;
+
+	switch (j->cardtype) {
+	case 100:
+		ixj_gpio_read(board);
+		fOffHook = j->gpio.bits.gpio3read ? 1 : 0;
+		break;
+	case 300:
+	case 400:
+	case 500:
+		SLIC_GetState(board);
+		if (j->pld_slicr.bits.state == PLD_SLIC_STATE_ACTIVE ||
+		    j->pld_slicr.bits.state == PLD_SLIC_STATE_STANDBY) {
+			if (j->flags.ringing) {
+				det = jiffies + (hertz / 50);
+				while (time_before(jiffies, det)) {
+					current->state = TASK_INTERRUPTIBLE;
+					schedule_timeout(1);
+				}
+				SLIC_GetState(board);
+				if (j->pld_slicr.bits.state == PLD_SLIC_STATE_RINGING) {
+					ixj_ring_on(board);
+				}
+			}
+			if (j->cardtype == 500) {
+				j->pld_scrr.byte = inb_p(j->XILINXbase);
+				fOffHook = j->pld_scrr.pcib.det ? 1 : 0;
+			} else
+				fOffHook = j->pld_slicr.bits.det ? 1 : 0;
+		}
+		break;
+	}
+	if (j->r_hook != fOffHook) {
+		j->r_hook = fOffHook;
+		if (j->port != PORT_POTS) {
+			j->ex.bits.hookstate = 1;
+			if (j->async_queue)
+				kill_fasync(j->async_queue, SIGIO);	// Send apps notice of change
+
+		}
+	}
+	if (j->port == PORT_PSTN && j->daa_mode == SOP_PU_CONVERSATION)
+		fOffHook |= 2;
+
+	if (j->port == PORT_SPEAKER)
+		fOffHook |= 2;
+
+	if (j->port == PORT_HANDSET)
+		fOffHook |= 2;
+
+	return fOffHook;
+}
+
+static void ixj_ring_off(board)
+{
+	IXJ *j = &ixj[board];
+
+	if (j->dsp.low == 0x20)	// Internet PhoneJACK
+	 {
+		if (ixjdebug > 0)
+			printk(KERN_INFO "IXJ Ring Off\n");
+		j->gpio.bytes.high = 0x0B;
+		j->gpio.bytes.low = 0x00;
+		j->gpio.bits.gpio1 = 0;
+		j->gpio.bits.gpio2 = 1;
+		j->gpio.bits.gpio5 = 0;
+		ixj_WriteDSPCommand(j->gpio.word, board);
+	} else			// Internet LineJACK
+	 {
+		if (ixjdebug > 0)
+			printk(KERN_INFO "IXJ Ring Off\n");
+
+		SLIC_SetState(PLD_SLIC_STATE_STANDBY, board);	
+
+		SLIC_GetState(board);
+	}
+}
+
+static void ixj_ring_start(int board)
+{
+	IXJ *j = &ixj[board];
+
+	j->flags.cringing = 1;
+	if (ixj_hookstate(board) & 1) {
+		if (j->port == PORT_POTS)
+			ixj_ring_off(board);
+		j->flags.cringing = 0;
+	} else {
+		j->ring_cadence_jif = jiffies;
+		j->ring_cadence_t = 15;
+		if (j->ring_cadence & 1 << j->ring_cadence_t) {
+			ixj_ring_on(board);
+		} else {
+			ixj_ring_off(board);
+		}
+	}
+}
+
+static int ixj_ring(int board)
+{
+	char cntr;
+	unsigned long jif, det;
+	IXJ *j = &ixj[board];
+
+	j->flags.ringing = 1;
+	if (ixj_hookstate(board) & 1) {
+		ixj_ring_off(board);
+		j->flags.ringing = 0;
+		return 1;
+	}
+	det = 0;
+	for (cntr = 0; cntr < j->maxrings; cntr++) {
+		jif = jiffies + (1 * hertz);
+		ixj_ring_on(board);
+		while (time_before(jiffies, jif)) {
+			if (ixj_hookstate(board) & 1) {
+				ixj_ring_off(board);
+				j->flags.ringing = 0;
+				return 1;
+			}
+			current->state = TASK_INTERRUPTIBLE;
+			schedule_timeout(1);
+		}
+		jif = jiffies + (3 * hertz);
+		ixj_ring_off(board);
+		while (time_before(jiffies, jif)) {
+			if (ixj_hookstate(board) & 1) {
+				det = jiffies + (hertz / 100);
+				while (time_before(jiffies, det)) {
+					current->state = TASK_INTERRUPTIBLE;
+					schedule_timeout(1);
+				}
+				if (ixj_hookstate(board) & 1) {
+					j->flags.ringing = 0;
+					return 1;
+				}
+			}
+			current->state = TASK_INTERRUPTIBLE;
+			schedule_timeout(1);
+		}
+	}
+	ixj_ring_off(board);
+	j->flags.ringing = 0;
+	return 0;
+}
+
+int ixj_open(struct phone_device *p, struct file *file_p)
+{
+	IXJ *j = &ixj[p->board];
+
+	if (!j->DSPbase)
+		return -ENODEV;
+
+	if (file_p->f_mode & FMODE_READ)
+		j->readers++;
+	if (file_p->f_mode & FMODE_WRITE)
+		j->writers++;
+
+	MOD_INC_USE_COUNT;
+
+	if (ixjdebug > 0)
+//    printk(KERN_INFO "Opening board %d\n", NUM(inode->i_rdev));
+		printk(KERN_INFO "Opening board %d\n", p->board);
+
+	return 0;
+}
+
+int ixj_release(struct inode *inode, struct file *file_p)
+{
+	IXJ_TONE ti;
+	int board = NUM(inode->i_rdev);
+	IXJ *j = &ixj[board];
+
+	if (ixjdebug > 0)
+		printk(KERN_INFO "Closing board %d\n", NUM(inode->i_rdev));
+
+	daa_set_mode(board, SOP_PU_SLEEP);
+	ixj_set_port(board, PORT_POTS);
+	aec_stop(board);
+	ixj_play_stop(board);
+	ixj_record_stop(board);
+
+	ti.tone_index = 10;
+	ti.gain0 = 1;
+	ti.freq0 = hz941;
+	ti.gain1 = 0;
+	ti.freq1 = hz1209;
+	ti.tone_index = 11;
+	ti.gain0 = 1;
+	ti.freq0 = hz941;
+	ti.gain1 = 0;
+	ti.freq1 = hz1336;
+	ti.tone_index = 12;
+	ti.gain0 = 1;
+	ti.freq0 = hz941;
+	ti.gain1 = 0;
+	ti.freq1 = hz1477;
+	ti.tone_index = 13;
+	ti.gain0 = 1;
+	ti.freq0 = hz800;
+	ti.gain1 = 0;
+	ti.freq1 = 0;
+	ixj_init_tone(board, &ti);
+	ti.tone_index = 14;
+	ti.gain0 = 1;
+	ti.freq0 = hz1000;
+	ti.gain1 = 0;
+	ti.freq1 = 0;
+	ixj_init_tone(board, &ti);
+	ti.tone_index = 15;
+	ti.gain0 = 1;
+	ti.freq0 = hz1250;
+	ti.gain1 = 0;
+	ti.freq1 = 0;
+	ixj_init_tone(board, &ti);
+	ti.tone_index = 16;
+	ti.gain0 = 1;
+	ti.freq0 = hz950;
+	ti.gain1 = 0;
+	ti.freq1 = 0;
+	ixj_init_tone(board, &ti);
+	ti.tone_index = 17;
+	ti.gain0 = 1;
+	ti.freq0 = hz1100;
+	ti.gain1 = 0;
+	ti.freq1 = 0;
+	ixj_init_tone(board, &ti);
+	ti.tone_index = 18;
+	ti.gain0 = 1;
+	ti.freq0 = hz1400;
+	ti.gain1 = 0;
+	ti.freq1 = 0;
+	ixj_init_tone(board, &ti);
+	ti.tone_index = 19;
+	ti.gain0 = 1;
+	ti.freq0 = hz1500;
+	ti.gain1 = 0;
+	ti.freq1 = 0;
+	ixj_init_tone(board, &ti);
+	ti.tone_index = 20;
+	ti.gain0 = 1;
+	ti.freq0 = hz1600;
+	ti.gain1 = 0;
+	ti.freq1 = 0;
+	ixj_init_tone(board, &ti);
+	ti.tone_index = 21;
+	ti.gain0 = 1;
+	ti.freq0 = hz1800;
+	ti.gain1 = 0;
+	ti.freq1 = 0;
+	ixj_init_tone(board, &ti);
+	ti.tone_index = 22;
+	ti.gain0 = 1;
+	ti.freq0 = hz2100;
+	ti.gain1 = 0;
+	ti.freq1 = 0;
+	ixj_init_tone(board, &ti);
+	ti.tone_index = 23;
+	ti.gain0 = 1;
+	ti.freq0 = hz1300;
+	ti.gain1 = 0;
+	ti.freq1 = 0;
+	ixj_init_tone(board, &ti);
+	ti.tone_index = 24;
+	ti.gain0 = 1;
+	ti.freq0 = hz2450;
+	ti.gain1 = 0;
+	ti.freq1 = 0;
+	ixj_init_tone(board, &ti);
+	ti.tone_index = 25;
+	ti.gain0 = 1;
+	ti.freq0 = hz350;
+	ti.gain1 = 0;
+	ti.freq1 = hz440;
+	ixj_init_tone(board, &ti);
+	ti.tone_index = 26;
+	ti.gain0 = 1;
+	ti.freq0 = hz440;
+	ti.gain1 = 0;
+	ti.freq1 = hz480;
+	ixj_init_tone(board, &ti);
+	ti.tone_index = 27;
+	ti.gain0 = 1;
+	ti.freq0 = hz480;
+	ti.gain1 = 0;
+	ti.freq1 = hz620;
+	ixj_init_tone(board, &ti);
+
+	idle(board);
+
+	if (file_p->f_mode & FMODE_READ)
+		j->readers--;
+	if (file_p->f_mode & FMODE_WRITE)
+		j->writers--;
+
+	if (j->read_buffer && !j->readers) {
+		kfree(j->read_buffer);
+		j->read_buffer = NULL;
+		j->read_buffer_size = 0;
+	}
+	if (j->write_buffer && !j->writers) {
+		kfree(j->write_buffer);
+		j->write_buffer = NULL;
+		j->write_buffer_size = 0;
+	}
+	j->rec_codec = j->play_codec = 0;
+	j->rec_frame_size = j->play_frame_size = 0;
+	ixj_fasync(-1, file_p, 0);	// remove from list of async notification
+
+	MOD_DEC_USE_COUNT;
+	return 0;
+}
+
+static int read_filters(int board)
+{
+	unsigned short fc, cnt;
+	IXJ *j = &ixj[board];
+
+	if (ixj_WriteDSPCommand(0x5144, board))
+		return -1;
+
+	fc = j->ssr.high << 8 | j->ssr.low;
+	if (fc == j->frame_count)
+		return 1;
+
+	j->frame_count = fc;
+
+	for (cnt = 0; cnt < 4; cnt++) {
+		if (ixj_WriteDSPCommand(0x5154 + cnt, board))
+			return -1;
+
+		if (ixj_WriteDSPCommand(0x515C, board))
+			return -1;
+
+		j->filter_hist[cnt] = j->ssr.high << 8 | j->ssr.low;
+		if ((j->filter_hist[cnt] & 1 && !(j->filter_hist[cnt] & 2)) ||
+		(j->filter_hist[cnt] & 2 && !(j->filter_hist[cnt] & 1))) {
+			switch (cnt) {
+			case 0:
+				j->ex.bits.f0 = 1;
+				break;
+			case 1:
+				j->ex.bits.f1 = 1;
+				break;
+			case 2:
+				j->ex.bits.f2 = 1;
+				break;
+			case 3:
+				j->ex.bits.f3 = 1;
+				break;
+			}
+		}
+	}
+	return 0;
+}
+
+static int LineMonitor(int board)
+{
+	IXJ *j = &ixj[board];
+
+	if (j->dtmf_proc) {
+		return -1;
+	}
+	j->dtmf_proc = 1;
+
+	if (ixj_WriteDSPCommand(0x7000, board))		// Line Monitor
+
+		return -1;
+
+	j->dtmf.bytes.high = j->ssr.high;
+	j->dtmf.bytes.low = j->ssr.low;
+	if (!j->dtmf_state && j->dtmf.bits.dtmf_valid) {
+		j->dtmf_state = 1;
+		j->dtmf_current = j->dtmf.bits.digit;
+	}
+	if (j->dtmf_state && !j->dtmf.bits.dtmf_valid)	// && j->dtmf_wp != j->dtmf_rp)
+	 {
+		j->dtmfbuffer[j->dtmf_wp] = j->dtmf_current;
+		j->dtmf_wp++;
+		if (j->dtmf_wp == 79)
+			j->dtmf_wp = 0;
+		j->ex.bits.dtmf_ready = 1;
+		j->dtmf_state = 0;
+	}
+	j->dtmf_proc = 0;
+
+	return 0;
+}
+
+ssize_t ixj_read(struct file * file_p, char *buf, size_t length, loff_t * ppos)
+{
+	unsigned long i = *ppos;
+	IXJ *j = &ixj[NUM(file_p->f_dentry->d_inode->i_rdev)];
+	struct wait_queue wait =
+	{current, NULL};
+
+	add_wait_queue(&j->read_q, &wait);
+	current->state = TASK_INTERRUPTIBLE;
+	mb();
+
+	while (!j->read_buffer_ready || (j->dtmf_state && j->flags.dtmf_oob)) {
+		++j->read_wait;
+		if (file_p->f_flags & O_NONBLOCK) {
+			current->state = TASK_RUNNING;
+			remove_wait_queue(&j->read_q, &wait);
+			return -EAGAIN;
+		}
+		if (!ixj_hookstate(NUM(file_p->f_dentry->d_inode->i_rdev))) {
+			current->state = TASK_RUNNING;
+			remove_wait_queue(&j->read_q, &wait);
+			return 0;
+		}
+		interruptible_sleep_on(&j->read_q);
+		if (signal_pending(current)) {
+			current->state = TASK_RUNNING;
+			remove_wait_queue(&j->read_q, &wait);
+			return -EINTR;
+		}
+	}
+
+	remove_wait_queue(&j->read_q, &wait);
+	current->state = TASK_RUNNING;
+	/* Don't ever copy more than the user asks */
+	i = copy_to_user(buf, j->read_buffer, min(length, j->read_buffer_size));
+	j->read_buffer_ready = 0;
+	if (i)
+		return -EFAULT;
+	else
+		return min(length, j->read_buffer_size);
+}
+
+ssize_t ixj_enhanced_read(struct file * file_p, char *buf, size_t length,
+			  loff_t * ppos)
+{
+	int pre_retval;
+	ssize_t read_retval = 0;
+	IXJ *j = &ixj[NUM(file_p->f_dentry->d_inode->i_rdev)];
+
+	pre_retval = ixj_PreRead(j, 0L);
+	switch (pre_retval) {
+	case NORMAL:
+		read_retval = ixj_read(file_p, buf, length, ppos);
+		ixj_PostRead(j, 0L);
+		break;
+	case NOPOST:
+		read_retval = ixj_read(file_p, buf, length, ppos);
+		break;
+	case POSTONLY:
+		ixj_PostRead(j, 0L);
+		break;
+	default:
+		read_retval = pre_retval;
+	}
+	return read_retval;
+}
+
+ssize_t ixj_write(struct file * file_p, const char *buf, size_t count, loff_t * ppos)
+{
+	unsigned long i = *ppos;
+	int board = NUM(file_p->f_dentry->d_inode->i_rdev);
+	IXJ *j = &ixj[board];
+	struct wait_queue wait =
+	{current, NULL};
+
+	add_wait_queue(&j->read_q, &wait);
+	current->state = TASK_INTERRUPTIBLE;
+	mb();
+
+
+	while (!j->write_buffers_empty) {
+		++j->write_wait;
+		if (file_p->f_flags & O_NONBLOCK) {
+			current->state = TASK_RUNNING;
+			remove_wait_queue(&j->read_q, &wait);
+			return -EAGAIN;
+		}
+		if (!ixj_hookstate(NUM(file_p->f_dentry->d_inode->i_rdev))) {
+			current->state = TASK_RUNNING;
+			remove_wait_queue(&j->read_q, &wait);
+			return 0;
+		}
+		interruptible_sleep_on(&j->write_q);
+		if (signal_pending(current)) {
+			current->state = TASK_RUNNING;
+			remove_wait_queue(&j->read_q, &wait);
+			return -EINTR;
+		}
+	}
+	current->state = TASK_RUNNING;
+	remove_wait_queue(&j->read_q, &wait);
+	if (j->write_buffer_wp + count >= j->write_buffer_end)
+		j->write_buffer_wp = j->write_buffer;
+	i = copy_from_user(j->write_buffer_wp, buf, min(count, j->write_buffer_size));
+	if (i)
+		return -EFAULT;
+
+	return min(count, j->write_buffer_size);
+}
+
+ssize_t ixj_enhanced_write(struct file * file_p, const char *buf, size_t count,
+			   loff_t * ppos)
+{
+	int pre_retval;
+	ssize_t write_retval = 0;
+	IXJ *j = &ixj[NUM(file_p->f_dentry->d_inode->i_rdev)];
+
+	pre_retval = ixj_PreWrite(j, 0L);
+	switch (pre_retval) {
+	case NORMAL:
+		write_retval = ixj_write(file_p, buf, count, ppos);
+		if (write_retval != -EFAULT) {
+			ixj_PostWrite(j, 0L);
+			j->write_buffer_wp += count;
+			j->write_buffers_empty--;
+		}
+		break;
+	case NOPOST:
+		write_retval = ixj_write(file_p, buf, count, ppos);
+		if (write_retval != -EFAULT) {
+			j->write_buffer_wp += count;
+			j->write_buffers_empty--;
+		}
+		break;
+	case POSTONLY:
+		ixj_PostWrite(j, 0L);
+		break;
+	default:
+		write_retval = pre_retval;
+	}
+	return write_retval;
+}
+
+static void ixj_read_frame(int board)
+{
+	int cnt, dly;
+	IXJ *j = &ixj[board];
+
+	if (j->read_buffer) {
+		for (cnt = 0; cnt < j->rec_frame_size * 2; cnt += 2) {
+			if (!(cnt % 16) && !IsRxReady(board)) {
+				dly = 0;
+				while (!IsRxReady(board)) {
+					if (dly++ > 5) {
+						dly = 0;
+						break;
+					}
+					udelay(10);
+				}
+			}
+			// Throw away word 0 of the 8021 compressed format to get standard G.729.
+			if (j->rec_codec == G729 && (cnt == 0 || cnt == 5 || cnt == 10)) {
+				inb_p(j->DSPbase + 0x0E);
+				inb_p(j->DSPbase + 0x0F);
+			}
+			*(j->read_buffer + cnt) = inb_p(j->DSPbase + 0x0E);
+			*(j->read_buffer + cnt + 1) = inb_p(j->DSPbase + 0x0F);
+		}
+#ifdef PERFMON_STATS
+		++j->framesread;
+#endif
+		if (j->intercom != -1) {
+			if (IsTxReady(j->intercom)) {
+				for (cnt = 0; cnt < j->rec_frame_size * 2; cnt += 2) {
+					if (!(cnt % 16) && !IsTxReady(board)) {
+						dly = 0;
+						while (!IsTxReady(board)) {
+							if (dly++ > 5) {
+								dly = 0;
+								break;
+							}
+							udelay(10);
+						}
+					}
+					outb_p(*(j->read_buffer + cnt), ixj[j->intercom].DSPbase + 0x0C);
+					outb_p(*(j->read_buffer + cnt + 1), ixj[j->intercom].DSPbase + 0x0D);
+				}
+#ifdef PERFMON_STATS
+				++ixj[j->intercom].frameswritten;
+#endif
+			}
+		} else {
+			j->read_buffer_ready = 1;
+			wake_up_interruptible(&j->read_q);	// Wake any blocked readers
+
+			wake_up_interruptible(&j->poll_q);	// Wake any blocked selects
+
+			if (j->async_queue)
+				kill_fasync(j->async_queue, SIGIO);	// Send apps notice of frame
+
+		}
+	}
+}
+
+static void ixj_write_frame(int board)
+{
+	int cnt, frame_count, dly;
+	BYTES blankword;
+	IXJ *j = &ixj[board];
+
+	frame_count = 0;
+	if (j->write_buffer && j->write_buffers_empty < 2) {
+		if (j->write_buffer_wp > j->write_buffer_rp) {
+			frame_count =
+			    (j->write_buffer_wp - j->write_buffer_rp) / (j->play_frame_size * 2);
+		}
+		if (j->write_buffer_rp > j->write_buffer_wp) {
+			frame_count =
+			    (j->write_buffer_wp - j->write_buffer) / (j->play_frame_size * 2) +
+			    (j->write_buffer_end - j->write_buffer_rp) / (j->play_frame_size * 2);
+		}
+		if (frame_count >= 1) {
+			if (j->ver.low == 0x12 && j->play_mode && j->flags.play_first_frame) {
+				switch (j->play_mode) {
+				case PLAYBACK_MODE_ULAW:
+				case PLAYBACK_MODE_ALAW:
+					blankword.low = blankword.high = 0xFF;
+					break;
+				case PLAYBACK_MODE_8LINEAR:
+				case PLAYBACK_MODE_16LINEAR:
+					blankword.low = blankword.high = 0x00;
+					break;
+				case PLAYBACK_MODE_8LINEAR_WSS:
+					blankword.low = blankword.high = 0x80;
+					break;
+				}
+				for (cnt = 0; cnt < 16; cnt++) {
+					if (!(cnt % 16) && !IsTxReady(board)) {
+						dly = 0;
+						while (!IsTxReady(board)) {
+							if (dly++ > 5) {
+								dly = 0;
+								break;
+							}
+							udelay(10);
+						}
+					}
+					outb_p((blankword.low), j->DSPbase + 0x0C);
+					outb_p((blankword.high), j->DSPbase + 0x0D);
+				}
+				j->flags.play_first_frame = 0;
+			}
+			for (cnt = 0; cnt < j->play_frame_size * 2; cnt += 2) {
+				if (!(cnt % 16) && !IsTxReady(board)) {
+					dly = 0;
+					while (!IsTxReady(board)) {
+						if (dly++ > 5) {
+							dly = 0;
+							break;
+						}
+						udelay(10);
+					}
+				}
+// Add word 0 to G.729 frames for the 8021.  Right now we don't do VAD/CNG 
+				// so all frames are type 1.
+				if (j->play_codec == G729 && (cnt == 0 || cnt == 5 || cnt == 10)) {
+					outb_p(0x01, j->DSPbase + 0x0C);
+					outb_p(0x00, j->DSPbase + 0x0D);
+				}
+				outb_p(*(j->write_buffer_rp + cnt), j->DSPbase + 0x0C);
+				outb_p(*(j->write_buffer_rp + cnt + 1), j->DSPbase + 0x0D);
+				*(j->write_buffer_rp + cnt) = 0;
+				*(j->write_buffer_rp + cnt + 1) = 0;
+			}
+			j->write_buffer_rp += j->play_frame_size * 2;
+			if (j->write_buffer_rp >= j->write_buffer_end) {
+				j->write_buffer_rp = j->write_buffer;
+			}
+			j->write_buffers_empty++;
+			wake_up_interruptible(&(j->write_q));	// Wake any blocked writers
+
+			wake_up_interruptible(&j->poll_q);	// Wake any blocked selects
+
+			if (j->async_queue)
+				kill_fasync(j->async_queue, SIGIO);	// Send apps notice of empty buffer
+#ifdef PERFMON_STATS
+			++j->frameswritten;
+#endif
+		}
+	} else {
+		j->drybuffer++;
+	}
+}
+
+static int idle(int board)
+{
+	IXJ *j = &ixj[board];
+
+	if (ixj_WriteDSPCommand(0x0000, board))		// DSP Idle
+
+		return 0;
+	if (j->ssr.high || j->ssr.low)
+		return 0;
+	else
+		return 1;
+}
+
+static int set_base_frame(int board, int size)
+{
+	unsigned short cmd;
+	int cnt;
+	IXJ *j = &ixj[board];
+
+	aec_stop(board);
+	for (cnt = 0; cnt < 10; cnt++) {
+		if (idle(board))
+			break;
+	}
+	if (j->ssr.high || j->ssr.low)
+		return -1;
+	if (j->dsp.low != 0x20) {
+		switch (size) {
+		case 30:
+			cmd = 0x07F0;
+			/* Set Base Frame Size to 240 pg9-10 8021 */
+			break;
+		case 20:
+			cmd = 0x07A0;
+			/* Set Base Frame Size to 160 pg9-10 8021 */
+			break;
+		case 10:
+			cmd = 0x0750;
+			/* Set Base Frame Size to 80 pg9-10 8021 */
+			break;
+		default:
+			return -1;
+		}
+	} else {
+		if (size == 30)
+			return size;
+		else
+			return -1;
+	}
+	if (ixj_WriteDSPCommand(cmd, board)) {
+		j->baseframe.high = j->baseframe.low = 0xFF;
+		return -1;
+	} else {
+		j->baseframe.high = j->ssr.high;
+		j->baseframe.low = j->ssr.low;
+	}
+	return size;
+}
+
+static int set_rec_codec(int board, int rate)
+{
+	int retval = 0;
+	IXJ *j = &ixj[board];
+
+	j->rec_codec = rate;
+
+	switch (rate) {
+	case G723_63:
+		if (j->ver.low != 0x12 || ixj_convert_loaded) {
+			j->rec_frame_size = 12;
+			j->rec_mode = 0;
+		} else {
+			retval = 1;
+		}
+		break;
+	case G723_53:
+		if (j->ver.low != 0x12 || ixj_convert_loaded) {
+			j->rec_frame_size = 10;
+			j->rec_mode = 0;
+		} else {
+			retval = 1;
+		}
+		break;
+	case TS85:
+		if (j->dsp.low == 0x20 || j->flags.ts85_loaded) {
+			j->rec_frame_size = 16;
+			j->rec_mode = 0;
+		} else {
+			retval = 1;
+		}
+		break;
+	case TS48:
+		if (j->ver.low != 0x12 || ixj_convert_loaded) {
+			j->rec_frame_size = 9;
+			j->rec_mode = 0;
+		} else {
+			retval = 1;
+		}
+		break;
+	case TS41:
+		if (j->ver.low != 0x12 || ixj_convert_loaded) {
+			j->rec_frame_size = 8;
+			j->rec_mode = 0;
+		} else {
+			retval = 1;
+		}
+		break;
+	case G728:
+		if (j->dsp.low != 0x20) {
+			j->rec_frame_size = 48;
+			j->rec_mode = 0;
+		} else {
+			retval = 1;
+		}
+		break;
+	case G729:
+		if (j->dsp.low != 0x20) {
+			if (!j->flags.g729_loaded) {
+				retval = 1;
+				break;
+			}
+			switch (j->baseframe.low) {
+			case 0xA0:
+				j->rec_frame_size = 10;
+				break;
+			case 0x50:
+				j->rec_frame_size = 5;
+				break;
+			default:
+				j->rec_frame_size = 15;
+				break;
+			}
+			j->rec_mode = 0;
+		} else {
+			retval = 1;
+		}
+		break;
+	case ULAW:
+		switch (j->baseframe.low) {
+		case 0xA0:
+			j->rec_frame_size = 80;
+			break;
+		case 0x50:
+			j->rec_frame_size = 40;
+			break;
+		default:
+			j->rec_frame_size = 120;
+			break;
+		}
+		j->rec_mode = 4;
+		break;
+	case ALAW:
+		switch (j->baseframe.low) {
+		case 0xA0:
+			j->rec_frame_size = 80;
+			break;
+		case 0x50:
+			j->rec_frame_size = 40;
+			break;
+		default:
+			j->rec_frame_size = 120;
+			break;
+		}
+		j->rec_mode = 4;
+		break;
+	case LINEAR16:
+		switch (j->baseframe.low) {
+		case 0xA0:
+			j->rec_frame_size = 160;
+			break;
+		case 0x50:
+			j->rec_frame_size = 80;
+			break;
+		default:
+			j->rec_frame_size = 240;
+			break;
+		}
+		j->rec_mode = 5;
+		break;
+	case LINEAR8:
+		switch (j->baseframe.low) {
+		case 0xA0:
+			j->rec_frame_size = 80;
+			break;
+		case 0x50:
+			j->rec_frame_size = 40;
+			break;
+		default:
+			j->rec_frame_size = 120;
+			break;
+		}
+		j->rec_mode = 6;
+		break;
+	case WSS:
+		switch (j->baseframe.low) {
+		case 0xA0:
+			j->rec_frame_size = 80;
+			break;
+		case 0x50:
+			j->rec_frame_size = 40;
+			break;
+		default:
+			j->rec_frame_size = 120;
+			break;
+		}
+		j->rec_mode = 7;
+		break;
+	default:
+		j->rec_frame_size = 0;
+		j->rec_mode = -1;
+		if (j->read_buffer) {
+			kfree(j->read_buffer);
+			j->read_buffer = NULL;
+			j->read_buffer_size = 0;
+		}
+		retval = 1;
+		break;
+	}
+	return retval;
+}
+
+static int ixj_record_start(int board)
+{
+	unsigned short cmd = 0x0000;
+	IXJ *j = &ixj[board];
+
+	if (!j->rec_mode) {
+		switch (j->rec_codec) {
+		case G723_63:
+			cmd = 0x5131;
+			break;
+		case G723_53:
+			cmd = 0x5132;
+			break;
+		case TS85:
+			cmd = 0x5130;	// TrueSpeech 8.5
+
+			break;
+		case TS48:
+			cmd = 0x5133;	// TrueSpeech 4.8
+
+			break;
+		case TS41:
+			cmd = 0x5134;	// TrueSpeech 4.1
+
+			break;
+		case G728:
+			cmd = 0x5135;
+			break;
+		case G729:
+			cmd = 0x5136;
+			break;
+		default:
+			return 1;
+		}
+		if (ixj_WriteDSPCommand(cmd, board))
+			return -1;
+	}
+	if (!j->read_buffer) {
+		if (!j->read_buffer)
+			j->read_buffer = kmalloc(j->rec_frame_size * 2, GFP_KERNEL);
+		if (!j->read_buffer) {
+			printk("Read buffer allocation for ixj board %d failed!\n", board);
+			return -ENOMEM;
+		}
+	}
+	j->read_buffer_size = j->rec_frame_size * 2;
+
+	if (ixj_WriteDSPCommand(0x5102, board))		// Set Poll sync mode
+
+		return -1;
+
+	switch (j->rec_mode) {
+	case 0:
+		cmd = 0x1C03;	// Record C1
+
+		break;
+	case 4:
+		if (j->ver.low == 0x12) {
+			cmd = 0x1E03;	// Record C1
+
+		} else {
+			cmd = 0x1E01;	// Record C1
+
+		}
+		break;
+	case 5:
+		if (j->ver.low == 0x12) {
+			cmd = 0x1E83;	// Record C1
+
+		} else {
+			cmd = 0x1E81;	// Record C1
+
+		}
+		break;
+	case 6:
+		if (j->ver.low == 0x12) {
+			cmd = 0x1F03;	// Record C1
+
+		} else {
+			cmd = 0x1F01;	// Record C1
+
+		}
+		break;
+	case 7:
+		if (j->ver.low == 0x12) {
+			cmd = 0x1F83;	// Record C1
+
+		} else {
+			cmd = 0x1F81;	// Record C1
+
+		}
+		break;
+	}
+	if (ixj_WriteDSPCommand(cmd, board))
+		return -1;
+
+	return 0;
+}
+
+static void ixj_record_stop(int board)
+{
+	IXJ *j = &ixj[board];
+
+	if (j->rec_mode > -1) {
+		ixj_WriteDSPCommand(0x5120, board);
+		j->rec_mode = -1;
+	}
+}
+
+static void set_rec_depth(int board, int depth)
+{
+	if (depth > 60)
+		depth = 60;
+	if (depth < 0)
+		depth = 0;
+	ixj_WriteDSPCommand(0x5180 + depth, board);
+}
+
+static void set_rec_volume(int board, int volume)
+{
+	ixj_WriteDSPCommand(0xCF03, board);
+	ixj_WriteDSPCommand(volume, board);
+}
+
+static int get_rec_level(int board)
+{
+	IXJ *j = &ixj[board];
+
+	ixj_WriteDSPCommand(0xCF88, board);
+
+	return j->ssr.high << 8 | j->ssr.low;
+}
+
+static void ixj_aec_start(int board, int level)
+{
+	IXJ *j = &ixj[board];
+
+	j->aec_level = level;
+	if (!level) {
+		ixj_WriteDSPCommand(0xB002, board);
+	} else {
+		if (j->rec_codec == G729 || j->play_codec == G729) {
+			ixj_WriteDSPCommand(0xE022, board);	// Move AEC filter buffer
+
+			ixj_WriteDSPCommand(0x0300, board);
+		}
+		ixj_WriteDSPCommand(0xB001, board);	// AEC On
+
+		ixj_WriteDSPCommand(0xE013, board);	// Advanced AEC C1
+
+		switch (level) {
+		case 1:
+			ixj_WriteDSPCommand(0x0000, board);	// Advanced AEC C2 = off
+
+			ixj_WriteDSPCommand(0xE011, board);
+			ixj_WriteDSPCommand(0xFFFF, board);
+			break;
+
+		case 2:
+			ixj_WriteDSPCommand(0x0600, board);	// Advanced AEC C2 = on medium
+
+			ixj_WriteDSPCommand(0xE011, board);
+			ixj_WriteDSPCommand(0x0080, board);
+			break;
+
+		case 3:
+			ixj_WriteDSPCommand(0x0C00, board);	// Advanced AEC C2 = on high
+
+			ixj_WriteDSPCommand(0xE011, board);
+			ixj_WriteDSPCommand(0x0080, board);
+			break;
+		}
+	}
+}
+
+static void aec_stop(int board)
+{
+	IXJ *j = &ixj[board];
+
+	if (j->rec_codec == G729 || j->play_codec == G729) {
+		ixj_WriteDSPCommand(0xE022, board);	// Move AEC filter buffer back
+
+		ixj_WriteDSPCommand(0x0700, board);
+	}
+	if (ixj[board].play_mode != -1 && ixj[board].rec_mode != -1);
+	{
+		ixj_WriteDSPCommand(0xB002, board);	// AEC Stop
+
+	}
+}
+
+static int set_play_codec(int board, int rate)
+{
+	int retval = 0;
+	IXJ *j = &ixj[board];
+
+	j->play_codec = rate;
+
+	switch (rate) {
+	case G723_63:
+		if (j->ver.low != 0x12 || ixj_convert_loaded) {
+			j->play_frame_size = 12;
+			j->play_mode = 0;
+		} else {
+			retval = 1;
+		}
+		break;
+	case G723_53:
+		if (j->ver.low != 0x12 || ixj_convert_loaded) {
+			j->play_frame_size = 10;
+			j->play_mode = 0;
+		} else {
+			retval = 1;
+		}
+		break;
+	case TS85:
+		if (j->dsp.low == 0x20 || j->flags.ts85_loaded) {
+			j->play_frame_size = 16;
+			j->play_mode = 0;
+		} else {
+			retval = 1;
+		}
+		break;
+	case TS48:
+		if (j->ver.low != 0x12 || ixj_convert_loaded) {
+			j->play_frame_size = 9;
+			j->play_mode = 0;
+		} else {
+			retval = 1;
+		}
+		break;
+	case TS41:
+		if (j->ver.low != 0x12 || ixj_convert_loaded) {
+			j->play_frame_size = 8;
+			j->play_mode = 0;
+		} else {
+			retval = 1;
+		}
+		break;
+	case G728:
+		if (j->dsp.low != 0x20) {
+			j->play_frame_size = 48;
+			j->play_mode = 0;
+		} else {
+			retval = 1;
+		}
+		break;
+	case G729:
+		if (j->dsp.low != 0x20) {
+			if (!j->flags.g729_loaded) {
+				retval = 1;
+				break;
+			}
+			switch (j->baseframe.low) {
+			case 0xA0:
+				j->play_frame_size = 10;
+				break;
+			case 0x50:
+				j->play_frame_size = 5;
+				break;
+			default:
+				j->play_frame_size = 15;
+				break;
+			}
+			j->play_mode = 0;
+		} else {
+			retval = 1;
+		}
+		break;
+	case ULAW:
+		switch (j->baseframe.low) {
+		case 0xA0:
+			j->play_frame_size = 80;
+			break;
+		case 0x50:
+			j->play_frame_size = 40;
+			break;
+		default:
+			j->play_frame_size = 120;
+			break;
+		}
+		j->play_mode = 2;
+		break;
+	case ALAW:
+		switch (j->baseframe.low) {
+		case 0xA0:
+			j->play_frame_size = 80;
+			break;
+		case 0x50:
+			j->play_frame_size = 40;
+			break;
+		default:
+			j->play_frame_size = 120;
+			break;
+		}
+		j->play_mode = 2;
+		break;
+	case LINEAR16:
+		switch (j->baseframe.low) {
+		case 0xA0:
+			j->play_frame_size = 160;
+			break;
+		case 0x50:
+			j->play_frame_size = 80;
+			break;
+		default:
+			j->play_frame_size = 240;
+			break;
+		}
+		j->play_mode = 6;
+		break;
+	case LINEAR8:
+		switch (j->baseframe.low) {
+		case 0xA0:
+			j->play_frame_size = 80;
+			break;
+		case 0x50:
+			j->play_frame_size = 40;
+			break;
+		default:
+			j->play_frame_size = 120;
+			break;
+		}
+		j->play_mode = 4;
+		break;
+	case WSS:
+		switch (j->baseframe.low) {
+		case 0xA0:
+			j->play_frame_size = 80;
+			break;
+		case 0x50:
+			j->play_frame_size = 40;
+			break;
+		default:
+			j->play_frame_size = 120;
+			break;
+		}
+		j->play_mode = 5;
+		break;
+	default:
+		j->play_frame_size = 0;
+		j->play_mode = -1;
+		if (j->write_buffer) {
+			kfree(j->write_buffer);
+			j->write_buffer = NULL;
+			j->write_buffer_size = 0;
+		}
+		retval = 1;
+		break;
+	}
+	return retval;
+}
+
+static int ixj_play_start(int board)
+{
+	unsigned short cmd = 0x0000;
+	IXJ *j = &ixj[board];
+
+	j->flags.play_first_frame = 1;
+	j->drybuffer = 0;
+
+	if (!j->play_mode) {
+		switch (j->play_codec) {
+		case G723_63:
+			cmd = 0x5231;
+			break;
+		case G723_53:
+			cmd = 0x5232;
+			break;
+		case TS85:
+			cmd = 0x5230;	// TrueSpeech 8.5
+
+			break;
+		case TS48:
+			cmd = 0x5233;	// TrueSpeech 4.8
+
+			break;
+		case TS41:
+			cmd = 0x5234;	// TrueSpeech 4.1
+
+			break;
+		case G728:
+			cmd = 0x5235;
+			break;
+		case G729:
+			cmd = 0x5236;
+			break;
+		default:
+			return 1;
+		}
+		if (ixj_WriteDSPCommand(cmd, board))
+			return -1;
+	}
+	if (!j->write_buffer) {
+		j->write_buffer = kmalloc(j->play_frame_size * 2, GFP_KERNEL);
+		if (!j->write_buffer) {
+			printk("Write buffer allocation for ixj board %d failed!\n", board);
+			return -ENOMEM;
+		}
+	}
+	j->write_buffers_empty = 2;
+	j->write_buffer_size = j->play_frame_size * 2;
+	j->write_buffer_end = j->write_buffer + j->play_frame_size * 2;
+	j->write_buffer_rp = j->write_buffer_wp = j->write_buffer;
+
+	if (ixj_WriteDSPCommand(0x5202, board))		// Set Poll sync mode
+
+		return -1;
+
+	switch (j->play_mode) {
+	case 0:
+		cmd = 0x2C03;
+		break;
+	case 2:
+		if (j->ver.low == 0x12) {
+			cmd = 0x2C23;
+		} else {
+			cmd = 0x2C21;
+		}
+		break;
+	case 4:
+		if (j->ver.low == 0x12) {
+			cmd = 0x2C43;
+		} else {
+			cmd = 0x2C41;
+		}
+		break;
+	case 5:
+		if (j->ver.low == 0x12) {
+			cmd = 0x2C53;
+		} else {
+			cmd = 0x2C51;
+		}
+		break;
+	case 6:
+		if (j->ver.low == 0x12) {
+			cmd = 0x2C63;
+		} else {
+			cmd = 0x2C61;
+		}
+		break;
+	}
+	if (ixj_WriteDSPCommand(cmd, board))
+		return -1;
+
+	if (ixj_WriteDSPCommand(0x2000, board))		// Playback C2
+
+		return -1;
+
+	if (ixj_WriteDSPCommand(0x2000 + ixj[board].play_frame_size, board))	// Playback C3
+
+		return -1;
+
+	return 0;
+}
+
+static void ixj_play_stop(int board)
+{
+	IXJ *j = &ixj[board];
+
+	if (j->play_mode > -1) {
+		ixj_WriteDSPCommand(0x5221, board);	// Stop playback
+
+		j->play_mode = -1;
+	}
+}
+
+extern __inline__ void set_play_depth(int board, int depth)
+{
+	if (depth > 60)
+		depth = 60;
+	if (depth < 0)
+		depth = 0;
+	ixj_WriteDSPCommand(0x5280 + depth, board);
+}
+
+extern __inline__ void set_play_volume(int board, int volume)
+{
+	ixj_WriteDSPCommand(0xCF02, board);
+	ixj_WriteDSPCommand(volume, board);
+}
+
+extern __inline__ int get_play_level(int board)
+{
+	ixj_WriteDSPCommand(0xCF8F, board);
+	return ixj[board].ssr.high << 8 | ixj[board].ssr.low;
+}
+
+static unsigned int ixj_poll(struct file *file_p, poll_table * wait)
+{
+	unsigned int mask = 0;
+	IXJ *j = &ixj[NUM(file_p->f_dentry->d_inode->i_rdev)];
+
+	poll_wait(file_p, &(j->poll_q), wait);
+	if (j->read_buffer_ready > 0)
+		mask |= POLLIN | POLLRDNORM;	/* readable */
+	if (j->write_buffers_empty > 0)
+		mask |= POLLOUT | POLLWRNORM;	/* writable */
+	if (j->ex.bytes)
+		mask |= POLLPRI;
+	return mask;
+}
+
+static int ixj_play_tone(int board, char tone)
+{
+	IXJ *j = &ixj[board];
+
+	if (!j->tone_state)
+		idle(board);
+
+	j->tone_index = tone;
+	if (ixj_WriteDSPCommand(0x6000 + j->tone_index, board))
+		return -1;
+
+	if (!j->tone_state) {
+		j->tone_start_jif = jiffies;
+
+		j->tone_state = 1;
+	}
+	return 0;
+}
+
+static int ixj_set_tone_on(unsigned short arg, int board)
+{
+	IXJ *j = &ixj[board];
+
+	j->tone_on_time = arg;
+
+	if (ixj_WriteDSPCommand(0x6E04, board))		// Set Tone On Period
+
+		return -1;
+
+	if (ixj_WriteDSPCommand(arg, board))
+		return -1;
+
+	return 0;
+}
+
+static int SCI_WaitHighSCI(int board)
+{
+	int cnt;
+	IXJ *j = &ixj[board];
+
+	j->pld_scrr.byte = inb_p(j->XILINXbase);
+	if (!j->pld_scrr.bits.sci) {
+		for (cnt = 0; cnt < 10; cnt++) {
+			udelay(32);
+			j->pld_scrr.byte = inb_p(j->XILINXbase);
+
+			if ((j->pld_scrr.bits.sci))
+				return 1;
+		}
+		if (ixjdebug > 1)
+			printk(KERN_INFO "SCI Wait High failed %x\n", j->pld_scrr.byte);
+		return 0;
+	} else
+		return 1;
+}
+
+static int SCI_WaitLowSCI(int board)
+{
+	int cnt;
+	IXJ *j = &ixj[board];
+
+	j->pld_scrr.byte = inb_p(j->XILINXbase);
+	if (j->pld_scrr.bits.sci) {
+		for (cnt = 0; cnt < 10; cnt++) {
+			udelay(32);
+			j->pld_scrr.byte = inb_p(j->XILINXbase);
+
+			if (!(j->pld_scrr.bits.sci))
+				return 1;
+		}
+		if (ixjdebug > 1)
+			printk(KERN_INFO "SCI Wait Low failed %x\n", j->pld_scrr.byte);
+		return 0;
+	} else
+		return 1;
+}
+
+static int SCI_Control(int board, int control)
+{
+	IXJ *j = &ixj[board];
+
+	switch (control) {
+	case SCI_End:
+		j->pld_scrw.bits.c0 = 0;	// Set PLD Serial control interface
+
+		j->pld_scrw.bits.c1 = 0;	// to no selection 
+
+		break;
+	case SCI_Enable_DAA:
+		j->pld_scrw.bits.c0 = 1;	// Set PLD Serial control interface
+
+		j->pld_scrw.bits.c1 = 0;	// to write to DAA
+
+		break;
+	case SCI_Enable_Mixer:
+		j->pld_scrw.bits.c0 = 0;	// Set PLD Serial control interface
+
+		j->pld_scrw.bits.c1 = 1;	// to write to mixer 
+
+		break;
+	case SCI_Enable_EEPROM:
+		j->pld_scrw.bits.c0 = 1;	// Set PLD Serial control interface
+
+		j->pld_scrw.bits.c1 = 1;	// to write to EEPROM 
+
+		break;
+	default:
+		return 0;
+		break;
+	}
+	outb_p(j->pld_scrw.byte, j->XILINXbase);
+
+	switch (control) {
+	case SCI_End:
+		return 1;
+		break;
+	case SCI_Enable_DAA:
+	case SCI_Enable_Mixer:
+	case SCI_Enable_EEPROM:
+		if (!SCI_WaitHighSCI(board))
+			return 0;
+		break;
+	default:
+		return 0;
+		break;
+	}
+	return 1;
+}
+
+static int SCI_Prepare(int board)
+{
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	return 1;
+}
+
+static int ixj_mixer(long val, int board)
+{
+	BYTES bytes;
+	IXJ *j = &ixj[board];
+
+	bytes.high = (val & 0xFF00) >> 8;
+	bytes.low = val & 0x00FF;
+
+	outb_p(bytes.high & 0x1F, j->XILINXbase + 0x03);	// Load Mixer Address
+
+	outb_p(bytes.low, j->XILINXbase + 0x02);	// Load Mixer Data
+
+	SCI_Control(board, SCI_Enable_Mixer);
+
+	SCI_Control(board, SCI_End);
+
+	return 0;
+}
+
+static int daa_load(BYTES * p_bytes, int board)
+{
+	IXJ *j = &ixj[board];
+
+	outb_p(p_bytes->high, j->XILINXbase + 0x03);
+	outb_p(p_bytes->low, j->XILINXbase + 0x02);
+	if (!SCI_Control(board, SCI_Enable_DAA))
+		return 0;
+	else
+		return 1;
+}
+
+static int ixj_daa_cr4(int board, char reg)
+{
+	IXJ *j = &ixj[board];
+	BYTES bytes;
+
+	switch (j->daa_mode) {
+	case SOP_PU_SLEEP:
+		bytes.high = 0x14;
+		break;
+	case SOP_PU_RINGING:
+		bytes.high = 0x54;
+		break;
+	case SOP_PU_CONVERSATION:
+		bytes.high = 0x94;
+		break;
+	case SOP_PU_PULSEDIALING:
+		bytes.high = 0xD4;
+		break;
+	}
+
+	switch (j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.bitreg.AGX) {
+	case 0:
+		j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.bitreg.AGR_Z = 0;
+		break;
+	case 1:
+		j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.bitreg.AGR_Z = 2;
+		break;
+	case 2:
+		j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.bitreg.AGR_Z = 1;
+		break;
+	case 3:
+		j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.bitreg.AGR_Z = 3;
+		break;
+	}
+
+	bytes.low = j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg;
+
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Prepare(board))
+		return 0;
+
+	return 1;
+}
+
+static char daa_int_read(int board)
+{
+	BYTES bytes;
+	IXJ *j = &ixj[board];
+
+	if (!SCI_Prepare(board))
+		return 0;
+
+	bytes.high = 0x38;
+	bytes.low = 0x00;
+	outb_p(bytes.high, j->XILINXbase + 0x03);
+	outb_p(bytes.low, j->XILINXbase + 0x02);
+
+	if (!SCI_Control(board, SCI_Enable_DAA))
+		return 0;
+
+	bytes.high = inb_p(j->XILINXbase + 0x03);
+	bytes.low = inb_p(j->XILINXbase + 0x02);
+	if (bytes.low != ALISDAA_ID_BYTE) {
+		if (ixjdebug > 0)
+			printk("Cannot read DAA ID Byte high = %d low = %d\n", bytes.high, bytes.low);
+		return 0;
+	}
+	if (!SCI_Control(board, SCI_Enable_DAA))
+		return 0;
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+
+	bytes.high = inb_p(j->XILINXbase + 0x03);
+	bytes.low = inb_p(j->XILINXbase + 0x02);
+
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.reg = bytes.high;
+	return 1;
+}
+
+static int ixj_daa_cid_reset(int board)
+{
+	int i;
+	BYTES bytes;
+	IXJ *j = &ixj[board];
+
+	if (!SCI_Prepare(board))
+		return 0;
+
+	bytes.high = 0x58;
+	bytes.low = 0x00;
+	outb_p(bytes.high, j->XILINXbase + 0x03);
+	outb_p(bytes.low, j->XILINXbase + 0x02);
+
+	if (!SCI_Control(board, SCI_Enable_DAA))
+		return 0;
+
+	if (!SCI_WaitHighSCI(board))
+		return 0;
+
+	for (i = 0; i < ALISDAA_CALLERID_SIZE - 1; i += 2) {
+		bytes.high = bytes.low = 0x00;
+		outb_p(bytes.high, j->XILINXbase + 0x03);
+
+		if (i < ALISDAA_CALLERID_SIZE - 1)
+			outb_p(bytes.low, j->XILINXbase + 0x02);
+
+		if (!SCI_Control(board, SCI_Enable_DAA))
+			return 0;
+
+		if (!SCI_WaitHighSCI(board))
+			return 0;
+
+	}
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+
+	return 1;
+}
+
+static int ixj_daa_cid_read(int board)
+{
+	int i;
+	BYTES bytes;
+	char CID[ALISDAA_CALLERID_SIZE], mContinue;
+	char *pIn, *pOut;
+	IXJ *j = &ixj[board];
+
+	if (!SCI_Prepare(board))
+		return 0;
+
+	bytes.high = 0x78;
+	bytes.low = 0x00;
+	outb_p(bytes.high, j->XILINXbase + 0x03);
+	outb_p(bytes.low, j->XILINXbase + 0x02);
+
+	if (!SCI_Control(board, SCI_Enable_DAA))
+		return 0;
+
+	if (!SCI_WaitHighSCI(board))
+		return 0;
+
+	bytes.high = inb_p(j->XILINXbase + 0x03);
+	bytes.low = inb_p(j->XILINXbase + 0x02);
+	if (bytes.low != ALISDAA_ID_BYTE) {
+		if (ixjdebug > 0)
+			printk("DAA Get Version Cannot read DAA ID Byte high = %d low = %d\n", bytes.high, bytes.low);
+		return 0;
+	}
+	for (i = 0; i < ALISDAA_CALLERID_SIZE; i += 2) {
+		bytes.high = bytes.low = 0x00;
+		outb_p(bytes.high, j->XILINXbase + 0x03);
+		outb_p(bytes.low, j->XILINXbase + 0x02);
+
+		if (!SCI_Control(board, SCI_Enable_DAA))
+			return 0;
+
+		if (!SCI_WaitHighSCI(board))
+			return 0;
+
+		CID[i + 0] = inb_p(j->XILINXbase + 0x03);
+		CID[i + 1] = inb_p(j->XILINXbase + 0x02);
+	}
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+
+	pIn = CID;
+	pOut = j->m_DAAShadowRegs.CAO_REGS.CAO.CallerID;
+	mContinue = 1;
+	while (mContinue) {
+		if ((pIn[1] & 0x03) == 0x01) {
+			pOut[0] = pIn[0];
+		}
+		if ((pIn[2] & 0x0c) == 0x04) {
+			pOut[1] = ((pIn[2] & 0x03) << 6) | ((pIn[1] & 0xfc) >> 2);
+		}
+		if ((pIn[3] & 0x30) == 0x10) {
+			pOut[2] = ((pIn[3] & 0x0f) << 4) | ((pIn[2] & 0xf0) >> 4);
+		}
+		if ((pIn[4] & 0xc0) == 0x40) {
+			pOut[3] = ((pIn[4] & 0x3f) << 2) | ((pIn[3] & 0xc0) >> 6);
+		} else {
+			mContinue = FALSE;
+		}
+		pIn += 5, pOut += 4;
+	}
+	memset(&j->cid, 0, sizeof(IXJ_CID));
+	pOut = j->m_DAAShadowRegs.CAO_REGS.CAO.CallerID;
+	pOut += 4;
+	strncpy(j->cid.month, pOut, 2);
+	pOut += 2;
+	strncpy(j->cid.day, pOut, 2);
+	pOut += 2;
+	strncpy(j->cid.hour, pOut, 2);
+	pOut += 2;
+	strncpy(j->cid.min, pOut, 2);
+	pOut += 3;
+	j->cid.numlen = *pOut;
+	pOut += 1;
+	strncpy(j->cid.number, pOut, j->cid.numlen);
+	pOut += j->cid.numlen + 1;
+	j->cid.namelen = *pOut;
+	pOut += 1;
+	strncpy(j->cid.name, pOut, j->cid.namelen);
+
+	ixj_daa_cid_reset(board);
+	return 1;
+}
+
+static char daa_get_version(int board)
+{
+	BYTES bytes;
+	IXJ *j = &ixj[board];
+
+	if (!SCI_Prepare(board))
+		return 0;
+
+	bytes.high = 0x35;
+	bytes.low = 0x00;
+	outb_p(bytes.high, j->XILINXbase + 0x03);
+	outb_p(bytes.low, j->XILINXbase + 0x02);
+
+	if (!SCI_Control(board, SCI_Enable_DAA))
+		return 0;
+
+	bytes.high = inb_p(j->XILINXbase + 0x03);
+	bytes.low = inb_p(j->XILINXbase + 0x02);
+	if (bytes.low != ALISDAA_ID_BYTE) {
+		if (ixjdebug > 0)
+			printk("DAA Get Version Cannot read DAA ID Byte high = %d low = %d\n", bytes.high, bytes.low);
+		return 0;
+	}
+	if (!SCI_Control(board, SCI_Enable_DAA))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+
+	bytes.high = inb_p(j->XILINXbase + 0x03);
+	bytes.low = inb_p(j->XILINXbase + 0x02);
+	if (ixjdebug > 0)
+		printk("DAA CR5 Byte high = 0x%x low = 0x%x\n", bytes.high, bytes.low);
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr5.reg = bytes.high;
+	return bytes.high;
+}
+
+static int daa_set_mode(int board, int mode)
+{
+	// NOTE:
+	//      The DAA *MUST* be in the conversation mode if the
+	//      PSTN line is to be seized (PSTN line off-hook).
+	//      Taking the PSTN line off-hook while the DAA is in
+	//      a mode other than conversation mode will cause a
+	//      hardware failure of the ALIS-A part.
+
+	// NOTE:
+	//      The DAA can only go to SLEEP, RINGING or PULSEDIALING modes
+	//      if the PSTN line is on-hook.  Failure to have the PSTN line
+	//      in the on-hook state WILL CAUSE A HARDWARE FAILURE OF THE
+	//      ALIS-A part.
+	//
+
+
+	BYTES bytes;
+	IXJ *j = &ixj[board];
+
+	if (!SCI_Prepare(board))
+		return 0;
+
+	switch (mode) {
+	case SOP_PU_SLEEP:
+		j->pld_scrw.bits.daafsyncen = 0;	// Turn off DAA Frame Sync
+
+		outb_p(j->pld_scrw.byte, j->XILINXbase);
+		j->pld_slicw.bits.rly2 = 0;
+		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+		bytes.high = 0x10;
+		bytes.low = j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg;
+		daa_load(&bytes, board);
+		if (!SCI_Prepare(board))
+			return 0;
+		j->daa_mode = SOP_PU_SLEEP;
+		j->flags.pstn_ringing = 0;
+		j->pstn_sleeptil = jiffies + (hertz * 3);
+		break;
+	case SOP_PU_RINGING:
+		j->pld_scrw.bits.daafsyncen = 0;	// Turn off DAA Frame Sync
+
+		outb_p(j->pld_scrw.byte, j->XILINXbase);
+		j->pld_slicw.bits.rly2 = 0;
+		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+		bytes.high = 0x50;
+		bytes.low = j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg;
+		daa_load(&bytes, board);
+		if (!SCI_Prepare(board))
+			return 0;
+		j->daa_mode = SOP_PU_RINGING;
+		break;
+	case SOP_PU_CONVERSATION:
+		bytes.high = 0x90;
+		bytes.low = j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg;
+		daa_load(&bytes, board);
+		if (!SCI_Prepare(board))
+			return 0;
+		j->pld_slicw.bits.rly2 = 1;
+		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+		j->pld_scrw.bits.daafsyncen = 1;	// Turn on DAA Frame Sync
+
+		outb_p(j->pld_scrw.byte, j->XILINXbase);
+		j->daa_mode = SOP_PU_CONVERSATION;
+		j->flags.pstn_ringing = 0;
+		j->ex.bits.pstn_ring = 0;
+		break;
+	case SOP_PU_PULSEDIALING:
+		j->pld_scrw.bits.daafsyncen = 0;	// Turn off DAA Frame Sync
+
+		outb_p(j->pld_scrw.byte, j->XILINXbase);
+		j->pld_slicw.bits.rly2 = 0;
+		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+		bytes.high = 0xD0;
+		bytes.low = j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg;
+		daa_load(&bytes, board);
+		if (!SCI_Prepare(board))
+			return 0;
+		j->daa_mode = SOP_PU_PULSEDIALING;
+		break;
+	default:
+		break;
+	}
+	return 1;
+}
+
+static int ixj_daa_write(int board)
+{
+	BYTES bytes;
+	IXJ *j = &ixj[board];
+
+	if (!SCI_Prepare(board))
+		return 0;
+
+	bytes.high = 0x14;
+	bytes.low = j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.SOP_REGS.SOP.cr3.reg;
+	bytes.low = j->m_DAAShadowRegs.SOP_REGS.SOP.cr2.reg;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.reg;
+	bytes.low = j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Prepare(board))
+		return 0;
+
+	bytes.high = 0x1F;
+	bytes.low = j->m_DAAShadowRegs.XOP_REGS.XOP.xr7.reg;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.XOP_xr6_W.reg;
+	bytes.low = j->m_DAAShadowRegs.XOP_REGS.XOP.xr5.reg;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.XOP_REGS.XOP.xr4.reg;
+	bytes.low = j->m_DAAShadowRegs.XOP_REGS.XOP.xr3.reg;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.XOP_REGS.XOP.xr2.reg;
+	bytes.low = j->m_DAAShadowRegs.XOP_REGS.XOP.xr1.reg;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.XOP_xr0_W.reg;
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Prepare(board))
+		return 0;
+
+	bytes.high = 0x00;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[7];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[6];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[5];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[4];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x01;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[7];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[6];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[5];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[4];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x02;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[7];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[6];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[5];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[4];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x03;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[7];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[6];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[5];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[4];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x04;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[7];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[6];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[5];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[4];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x05;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[7];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[6];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[5];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[4];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x06;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[7];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[6];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[5];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[4];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x07;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[7];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[6];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[5];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[4];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x08;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[7];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[6];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[5];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[4];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x09;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x0A;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x0B;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x0C;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x0D;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x0E;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[7];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[6];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[5];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[4];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+	if (!SCI_WaitLowSCI(board))
+		return 0;
+
+	bytes.high = 0x0F;
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[7];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[6];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[5];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[4];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[3];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[2];
+	bytes.low = j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[1];
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	bytes.high = j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[0];
+	bytes.low = 0x00;
+	if (!daa_load(&bytes, board))
+		return 0;
+
+	udelay(32);
+	j->pld_scrr.byte = inb_p(j->XILINXbase);
+	if (!SCI_Control(board, SCI_End))
+		return 0;
+
+	return 1;
+}
+
+int ixj_set_tone_off(unsigned short arg, int board)
+{
+	ixj[board].tone_off_time = arg;
+
+	if (ixj_WriteDSPCommand(0x6E05, board))		// Set Tone Off Period
+
+		return -1;
+
+	if (ixj_WriteDSPCommand(arg, board))
+		return -1;
+
+	return 0;
+}
+
+static int ixj_get_tone_on(int board)
+{
+	if (ixj_WriteDSPCommand(0x6E06, board))		// Get Tone On Period
+
+		return -1;
+
+	return 0;
+}
+
+static int ixj_get_tone_off(int board)
+{
+	if (ixj_WriteDSPCommand(0x6E07, board))		// Get Tone Off Period
+
+		return -1;
+
+	return 0;
+}
+
+static void ixj_busytone(int board)
+{
+	ixj[board].flags.ringback = 0;
+	ixj[board].flags.dialtone = 0;
+	ixj[board].flags.busytone = 1;
+
+	ixj_set_tone_on(0x07D0, board);
+	ixj_set_tone_off(0x07D0, board);
+	ixj_play_tone(board, 27);
+}
+
+static void ixj_dialtone(int board)
+{
+	ixj[board].flags.ringback = 0;
+	ixj[board].flags.dialtone = 1;
+	ixj[board].flags.busytone = 0;
+
+	if (ixj[board].dsp.low == 0x20) {
+		return;
+	} else {
+		ixj_set_tone_on(0xFFFF, board);
+		ixj_set_tone_off(0x0000, board);
+
+		ixj_play_tone(board, 25);
+	}
+}
+
+static void ixj_cpt_stop(board)
+{
+	IXJ *j = &ixj[board];
+
+	j->flags.dialtone = 0;
+	j->flags.busytone = 0;
+	j->flags.ringback = 0;
+
+	ixj_set_tone_on(0x0001, board);
+	ixj_set_tone_off(0x0000, board);
+
+	ixj_play_tone(board, 0);
+
+	j->tone_state = 0;
+
+	if (j->cadence_t) {
+		if (j->cadence_t->ce) {
+			kfree(j->cadence_t->ce);
+		}
+		kfree(j->cadence_t);
+		j->cadence_t = NULL;
+	}
+	if (j->dsp.low == 0x20 || (j->play_mode == -1 && j->rec_mode == -1))
+		idle(board);
+	if (j->play_mode != -1)
+		ixj_play_start(board);
+	if (j->rec_mode != -1)
+		ixj_record_start(board);
+}
+
+static void ixj_ringback(int board)
+{
+	ixj[board].flags.busytone = 0;
+	ixj[board].flags.dialtone = 0;
+	ixj[board].flags.ringback = 1;
+
+	ixj_set_tone_on(0x0FA0, board);
+	ixj_set_tone_off(0x2EE0, board);
+	ixj_play_tone(board, 26);
+}
+
+static void ixj_testram(int board)
+{
+	ixj_WriteDSPCommand(0x3001, board);	/* Test External SRAM */
+}
+
+static int ixj_build_cadence(int board, IXJ_CADENCE * cp)
+{
+	IXJ_CADENCE *lcp;
+	IXJ_CADENCE_ELEMENT *lcep;
+	IXJ_TONE ti;
+	IXJ *j = &ixj[board];
+
+	lcp = kmalloc(sizeof(IXJ_CADENCE), GFP_KERNEL);
+	if (lcp == NULL)
+		return -ENOMEM;
+
+	if (copy_from_user(lcp, (char *) cp, sizeof(IXJ_CADENCE)))
+		return -EFAULT;
+
+	lcep = kmalloc(sizeof(IXJ_CADENCE_ELEMENT) * lcp->elements_used, GFP_KERNEL);
+	if (lcep == NULL) {
+		kfree(lcp);
+		return -ENOMEM;
+	}
+	if (copy_from_user(lcep, lcp->ce, sizeof(IXJ_CADENCE_ELEMENT) * lcp->elements_used))
+		return -EFAULT;
+
+	lcp->ce = (void *) lcep;
+	j->cadence_t = lcp;
+	j->tone_cadence_state = 0;
+	ixj_set_tone_on(lcp->ce[0].tone_on_time, board);
+	ixj_set_tone_off(lcp->ce[0].tone_off_time, board);
+	if (j->cadence_t->ce[j->tone_cadence_state].freq0) {
+		ti.tone_index = j->cadence_t->ce[j->tone_cadence_state].index;
+		ti.freq0 = j->cadence_t->ce[j->tone_cadence_state].freq0;
+		ti.gain0 = j->cadence_t->ce[j->tone_cadence_state].gain0;
+		ti.freq1 = j->cadence_t->ce[j->tone_cadence_state].freq1;
+		ti.gain1 = j->cadence_t->ce[j->tone_cadence_state].gain1;
+		ixj_init_tone(board, &ti);
+	}
+	ixj_play_tone(board, lcp->ce[0].index);
+
+	return 1;
+}
+
+static void add_caps(int board)
+{
+	IXJ *j = &ixj[board];
+	j->caps = 0;
+
+	j->caplist[j->caps].cap = vendor;
+	strcpy(j->caplist[j->caps].desc, "Quicknet Technologies, Inc. (www.quicknet.net)");
+	j->caplist[j->caps].captype = vendor;
+	j->caplist[j->caps].handle = j->caps++;
+	j->caplist[j->caps].captype = device;
+	switch (j->cardtype) {
+	case 100:
+		strcpy(j->caplist[j->caps].desc, "Quicknet Internet PhoneJACK");
+		j->caplist[j->caps].cap = 100;
+		break;
+	case 300:
+		strcpy(j->caplist[j->caps].desc, "Quicknet Internet LineJACK");
+		j->caplist[j->caps].cap = 300;
+		break;
+	case 400:
+		strcpy(j->caplist[j->caps].desc, "Quicknet Internet PhoneJACK Lite");
+		j->caplist[j->caps].cap = 400;
+		break;
+	case 500:
+		strcpy(j->caplist[j->caps].desc, "Quicknet Internet PhoneJACK PCI");
+		j->caplist[j->caps].cap = 500;
+		break;
+	}
+	j->caplist[j->caps].handle = j->caps++;
+	strcpy(j->caplist[j->caps].desc, "POTS");
+	j->caplist[j->caps].captype = port;
+	j->caplist[j->caps].cap = pots;
+	j->caplist[j->caps].handle = j->caps++;
+	switch (ixj[board].cardtype) {
+	case 100:
+		strcpy(j->caplist[j->caps].desc, "SPEAKER");
+		j->caplist[j->caps].captype = port;
+		j->caplist[j->caps].cap = speaker;
+		j->caplist[j->caps].handle = j->caps++;
+		strcpy(j->caplist[j->caps].desc, "HANDSET");
+		j->caplist[j->caps].captype = port;
+		j->caplist[j->caps].cap = handset;
+		j->caplist[j->caps].handle = j->caps++;
+		break;
+	case 300:
+		strcpy(j->caplist[j->caps].desc, "SPEAKER");
+		j->caplist[j->caps].captype = port;
+		j->caplist[j->caps].cap = speaker;
+		j->caplist[j->caps].handle = j->caps++;
+		strcpy(j->caplist[j->caps].desc, "PSTN");
+		j->caplist[j->caps].captype = port;
+		j->caplist[j->caps].cap = pstn;
+		j->caplist[j->caps].handle = j->caps++;
+		break;
+	}
+	strcpy(j->caplist[j->caps].desc, "ULAW");
+	j->caplist[j->caps].captype = codec;
+	j->caplist[j->caps].cap = ULAW;
+	j->caplist[j->caps].handle = j->caps++;
+	strcpy(j->caplist[j->caps].desc, "LINEAR 16 bit");
+	j->caplist[j->caps].captype = codec;
+	j->caplist[j->caps].cap = LINEAR16;
+	j->caplist[j->caps].handle = j->caps++;
+	strcpy(j->caplist[j->caps].desc, "LINEAR 8 bit");
+	j->caplist[j->caps].captype = codec;
+	j->caplist[j->caps].cap = LINEAR8;
+	j->caplist[j->caps].handle = j->caps++;
+	strcpy(j->caplist[j->caps].desc, "Windows Sound System");
+	j->caplist[j->caps].captype = codec;
+	j->caplist[j->caps].cap = WSS;
+	j->caplist[j->caps].handle = j->caps++;
+	if (j->ver.low != 0x12) {
+		strcpy(j->caplist[j->caps].desc, "G.723.1 6.3Kbps");
+		j->caplist[j->caps].captype = codec;
+		j->caplist[j->caps].cap = G723_63;
+		j->caplist[j->caps].handle = j->caps++;
+		strcpy(j->caplist[j->caps].desc, "G.723.1 5.3Kbps");
+		j->caplist[j->caps].captype = codec;
+		j->caplist[j->caps].cap = G723_53;
+		j->caplist[j->caps].handle = j->caps++;
+		strcpy(j->caplist[j->caps].desc, "TrueSpeech 4.8Kbps");
+		j->caplist[j->caps].captype = codec;
+		j->caplist[j->caps].cap = TS48;
+		j->caplist[j->caps].handle = j->caps++;
+		strcpy(j->caplist[j->caps].desc, "TrueSpeech 4.1Kbps");
+		j->caplist[j->caps].captype = codec;
+		j->caplist[j->caps].cap = TS41;
+		j->caplist[j->caps].handle = j->caps++;
+	}
+	if (j->cardtype == 100) {
+		strcpy(j->caplist[j->caps].desc, "TrueSpeech 8.5Kbps");
+		j->caplist[j->caps].captype = codec;
+		j->caplist[j->caps].cap = TS85;
+		j->caplist[j->caps].handle = j->caps++;
+	}
+}
+static int capabilities_check(int board, struct phone_capability *pcreq)
+{
+	int cnt;
+	IXJ *j = &ixj[board];
+	int retval = 0;
+
+	for (cnt = 0; cnt < j->caps; cnt++) {
+		if (pcreq->captype == j->caplist[cnt].captype &&
+		    pcreq->cap == j->caplist[cnt].cap) {
+			retval = 1;
+			break;
+		}
+	}
+	return retval;
+}
+
+int ixj_ioctl(struct inode *inode, struct file *file_p,
+	      unsigned int cmd, unsigned long arg)
+{
+	IXJ_TONE ti;
+	IXJ_FILTER jf;
+	unsigned int minor = MINOR(inode->i_rdev);
+	int board = NUM(inode->i_rdev);
+	IXJ *j = &ixj[NUM(inode->i_rdev)];
+	int retval = 0;
+
+	if (ixjdebug > 1)
+		printk(KERN_DEBUG "ixj%d ioctl, cmd: 0x%x, arg: 0x%lx\n", minor, cmd, arg);
+	if (minor >= IXJMAX)
+		return -ENODEV;
+
+	/*
+	 *    Check ioctls only root can use.
+	 */
+
+	if (!capable(CAP_SYS_ADMIN)) {
+		switch (cmd) {
+		case IXJCTL_TESTRAM:
+		case IXJCTL_HZ:
+			return -EPERM;
+		}
+	}
+	switch (cmd) {
+	case IXJCTL_TESTRAM:
+		ixj_testram(board);
+		retval = (j->ssr.high << 8) + j->ssr.low;
+		break;
+	case IXJCTL_CARDTYPE:
+		retval = j->cardtype;
+		break;
+	case IXJCTL_SERIAL:
+		retval = j->serial;
+		break;
+	case PHONE_RING_CADENCE:
+		j->ring_cadence = arg;
+		break;
+	case PHONE_RING_START:
+		ixj_ring_start(board);
+		break;
+	case PHONE_RING_STOP:
+		j->flags.cringing = 0;
+		ixj_ring_off(board);
+		break;
+	case PHONE_RING:
+		retval = ixj_ring(board);
+		break;
+	case PHONE_EXCEPTION:
+		retval = j->ex.bytes;
+		j->ex.bytes &= 0x03;
+		break;
+	case PHONE_HOOKSTATE:
+		j->ex.bits.hookstate = 0;
+		retval = j->r_hook;
+		break;
+	case IXJCTL_SET_LED:
+		LED_SetState(arg, board);
+		break;
+	case PHONE_FRAME:
+		retval = set_base_frame(board, arg);
+		break;
+	case PHONE_REC_CODEC:
+		retval = set_rec_codec(board, arg);
+		break;
+	case PHONE_REC_START:
+		ixj_record_start(board);
+		break;
+	case PHONE_REC_STOP:
+		ixj_record_stop(board);
+		break;
+	case PHONE_REC_DEPTH:
+		set_rec_depth(board, arg);
+		break;
+	case PHONE_REC_VOLUME:
+		set_rec_volume(board, arg);
+		break;
+	case PHONE_REC_LEVEL:
+		retval = get_rec_level(board);
+		break;
+	case IXJCTL_AEC_START:
+		ixj_aec_start(board, arg);
+		break;
+	case IXJCTL_AEC_STOP:
+		aec_stop(board);
+		break;
+	case IXJCTL_AEC_GET_LEVEL:
+		retval = j->aec_level;
+		break;
+	case PHONE_PLAY_CODEC:
+		retval = set_play_codec(board, arg);
+		break;
+	case PHONE_PLAY_START:
+		ixj_play_start(board);
+		break;
+	case PHONE_PLAY_STOP:
+		ixj_play_stop(board);
+		break;
+	case PHONE_PLAY_DEPTH:
+		set_play_depth(board, arg);
+		break;
+	case PHONE_PLAY_VOLUME:
+		set_play_volume(board, arg);
+		break;
+	case PHONE_PLAY_LEVEL:
+		retval = get_play_level(board);
+		break;
+	case IXJCTL_DSP_TYPE:
+		retval = (j->dsp.high << 8) + j->dsp.low;
+		break;
+	case IXJCTL_DSP_VERSION:
+		retval = (j->ver.high << 8) + j->ver.low;
+		break;
+	case IXJCTL_HZ:
+		hertz = arg;
+		break;
+	case IXJCTL_RATE:
+		if (arg > hertz)
+			retval = -1;
+		else
+			samplerate = arg;
+		break;
+	case IXJCTL_DRYBUFFER_READ:
+		put_user(j->drybuffer, (unsigned long *) arg);
+		break;
+	case IXJCTL_DRYBUFFER_CLEAR:
+		j->drybuffer = 0;
+		break;
+	case IXJCTL_FRAMES_READ:
+		put_user(j->framesread, (unsigned long *) arg);
+		break;
+	case IXJCTL_FRAMES_WRITTEN:
+		put_user(j->frameswritten, (unsigned long *) arg);
+		break;
+	case IXJCTL_READ_WAIT:
+		put_user(j->read_wait, (unsigned long *) arg);
+		break;
+	case IXJCTL_WRITE_WAIT:
+		put_user(j->write_wait, (unsigned long *) arg);
+		break;
+	case PHONE_MAXRINGS:
+		j->maxrings = arg;
+		break;
+	case PHONE_SET_TONE_ON_TIME:
+		ixj_set_tone_on(arg, board);
+		break;
+	case PHONE_SET_TONE_OFF_TIME:
+		ixj_set_tone_off(arg, board);
+		break;
+	case PHONE_GET_TONE_ON_TIME:
+		if (ixj_get_tone_on(board)) {
+			retval = -1;
+		} else {
+			retval = (j->ssr.high << 8) + j->ssr.low;
+		}
+		break;
+	case PHONE_GET_TONE_OFF_TIME:
+		if (ixj_get_tone_off(board)) {
+			retval = -1;
+		} else {
+			retval = (j->ssr.high << 8) + j->ssr.low;
+		}
+		break;
+	case PHONE_PLAY_TONE:
+		if (!j->tone_state)
+			ixj_play_tone(board, arg);
+		break;
+	case PHONE_GET_TONE_STATE:
+		retval = j->tone_state;
+		break;
+	case PHONE_DTMF_READY:
+		retval = j->ex.bits.dtmf_ready;
+		break;
+	case PHONE_GET_DTMF:
+		if (ixj_hookstate(board)) {
+			if (j->dtmf_rp != j->dtmf_wp) {
+				retval = j->dtmfbuffer[j->dtmf_rp];
+				j->dtmf_rp++;
+				if (j->dtmf_rp == 79)
+					j->dtmf_rp = 0;
+				if (j->dtmf_rp == j->dtmf_wp) {
+					j->ex.bits.dtmf_ready = j->dtmf_rp = j->dtmf_wp = 0;
+				}
+			}
+		}
+		break;
+	case PHONE_GET_DTMF_ASCII:
+		if (ixj_hookstate(board)) {
+			if (j->dtmf_rp != j->dtmf_wp) {
+				switch (j->dtmfbuffer[j->dtmf_rp]) {
+				case 10:
+					retval = 42;	//'*';
+
+					break;
+				case 11:
+					retval = 48;	//'0';
+
+					break;
+				case 12:
+					retval = 35;	//'#';
+
+					break;
+				case 28:
+					retval = 65;	//'A';
+
+					break;
+				case 29:
+					retval = 66;	//'B';
+
+					break;
+				case 30:
+					retval = 67;	//'C';
+
+					break;
+				case 31:
+					retval = 68;	//'D';
+
+					break;
+				default:
+					retval = 48 + j->dtmfbuffer[j->dtmf_rp];
+					break;
+				}
+				j->dtmf_rp++;
+				if (j->dtmf_rp == 79)
+					j->dtmf_rp = 0;
+//          if(j->dtmf_rp == j->dtmf_wp)
+				{
+					j->ex.bits.dtmf_ready = j->dtmf_rp = j->dtmf_wp = 0;
+				}
+			}
+		}
+		break;
+	case PHONE_DTMF_OOB:
+		j->flags.dtmf_oob = arg;
+		break;
+	case PHONE_DIALTONE:
+		ixj_dialtone(board);
+		break;
+	case PHONE_BUSY:
+		ixj_busytone(board);
+		break;
+	case PHONE_RINGBACK:
+		ixj_ringback(board);
+		break;
+	case PHONE_CPT_STOP:
+		ixj_cpt_stop(board);
+		break;
+	case IXJCTL_DSP_IDLE:
+		idle(board);
+		break;
+	case IXJCTL_MIXER:
+		ixj_mixer(arg, board);
+		break;
+	case IXJCTL_DAA_COEFF_SET:
+		switch (arg) {
+		case DAA_US:
+			DAA_Coeff_US(board);
+			ixj_daa_write(board);
+			break;
+		case DAA_UK:
+			DAA_Coeff_UK(board);
+			ixj_daa_write(board);
+			break;
+		case DAA_FRANCE:
+			DAA_Coeff_France(board);
+			ixj_daa_write(board);
+			break;
+		case DAA_GERMANY:
+			DAA_Coeff_Germany(board);
+			ixj_daa_write(board);
+			break;
+		case DAA_AUSTRALIA:
+			DAA_Coeff_Australia(board);
+			ixj_daa_write(board);
+			break;
+		case DAA_JAPAN:
+			DAA_Coeff_Japan(board);
+			ixj_daa_write(board);
+			break;
+		default:
+			break;
+		}
+		break;
+	case IXJCTL_DAA_AGAIN:
+		ixj_daa_cr4(board, arg | 0x02);
+		break;
+	case IXJCTL_PSTN_LINETEST:
+		retval = ixj_linetest(board);
+		break;
+	case IXJCTL_CID:
+		if (copy_to_user((char *) arg, &j->cid, sizeof(IXJ_CID)))
+			return -EFAULT;
+		j->ex.bits.caller_id = 0;
+		break;
+	case IXJCTL_WINK_DURATION:
+		j->winktime = arg;
+		break;
+	case IXJCTL_PORT:
+		if (arg)
+			retval = ixj_set_port(board, arg);
+		else
+			retval = j->port;
+		break;
+	case IXJCTL_POTS_PSTN:
+		retval = ixj_set_pots(board, arg);
+		break;
+	case PHONE_CAPABILITIES:
+		retval = j->caps;
+		break;
+	case PHONE_CAPABILITIES_LIST:
+		if (copy_to_user((char *) arg, j->caplist, sizeof(struct phone_capability) * j->caps))
+			return -EFAULT;
+		break;
+	case PHONE_CAPABILITIES_CHECK:
+		retval = capabilities_check(board, (struct phone_capability *) arg);
+		break;
+	case PHONE_PSTN_SET_STATE:
+		daa_set_mode(board, arg);
+		break;
+	case PHONE_PSTN_GET_STATE:
+		retval = j->daa_mode;
+		j->ex.bits.pstn_ring = 0;
+		break;
+	case IXJCTL_SET_FILTER:
+		if (copy_from_user(&jf, (char *) arg, sizeof(ti)))
+			return -EFAULT;
+		retval = ixj_init_filter(board, &jf);
+		break;
+	case IXJCTL_GET_FILTER_HIST:
+		retval = j->filter_hist[arg];
+		break;
+	case IXJCTL_INIT_TONE:
+		copy_from_user(&ti, (char *) arg, sizeof(ti));
+		retval = ixj_init_tone(board, &ti);
+		break;
+	case IXJCTL_TONE_CADENCE:
+		retval = ixj_build_cadence(board, (IXJ_CADENCE *) arg);
+		break;
+	case IXJCTL_INTERCOM_STOP:
+		ixj[board].intercom = -1;
+		ixj[arg].intercom = -1;
+		ixj_record_stop(board);
+		ixj_record_stop(arg);
+		ixj_play_stop(board);
+		ixj_play_stop(arg);
+		idle(board);
+		idle(arg);
+		break;
+	case IXJCTL_INTERCOM_START:
+		ixj[board].intercom = arg;
+		ixj[arg].intercom = board;
+		ixj_play_start(arg);
+		ixj_record_start(board);
+		ixj_play_start(board);
+		ixj_record_start(arg);
+		idle(board);
+		idle(arg);
+		break;
+	}
+	return retval;
+}
+
+static int ixj_fasync(int fd, struct file *file_p, int mode)
+{
+	IXJ *j = &ixj[NUM(file_p->f_dentry->d_inode->i_rdev)];
+	return fasync_helper(fd, file_p, mode, &j->async_queue);
+}
+
+struct file_operations ixj_fops =
+{
+	NULL,			/* ixj_lseek */
+	ixj_enhanced_read,
+	ixj_enhanced_write,
+	NULL,			/* ixj_readdir */
+	ixj_poll,
+	ixj_ioctl,
+	NULL,			/* ixj_mmap */
+//  ixj_open,
+	NULL,			/* ixj_open */
+	NULL,			/* ixj_flush */
+	ixj_release,
+	NULL,			/* ixj_fsync */
+	ixj_fasync,		/* ixj_fasync */
+	NULL,			/* media change */
+	NULL,			/* revalidate */
+	NULL			/* lock */
+};
+
+static int ixj_linetest(int board)
+{
+	unsigned long jifwait;
+	IXJ *j = &ixj[board];
+
+	if (!j->flags.pots_correct) {
+		j->flags.pots_correct = 1;	// Testing
+
+		daa_int_read(board);	//Clear DAA Interrupt flags
+		//
+		// Hold all relays in the normally de-energized position.
+		//
+
+		j->pld_slicw.bits.rly1 = 0;
+		j->pld_slicw.bits.rly2 = 0;
+		j->pld_slicw.bits.rly3 = 0;
+		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+		j->pld_scrw.bits.daafsyncen = 0;	// Turn off DAA Frame Sync
+
+		outb_p(j->pld_scrw.byte, j->XILINXbase);
+		j->pld_slicr.byte = inb_p(j->XILINXbase + 0x01);
+		if (j->pld_slicr.bits.potspstn) {
+			j->flags.pots_pstn = 1;
+			j->flags.pots_correct = 0;
+			LED_SetState(0x4, board);
+		} else {
+			j->flags.pots_pstn = 0;
+			j->pld_slicw.bits.rly1 = 0;
+			j->pld_slicw.bits.rly2 = 0;
+			j->pld_slicw.bits.rly3 = 1;
+			outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+			j->pld_scrw.bits.daafsyncen = 0;	// Turn off DAA Frame Sync
+
+			outb_p(j->pld_scrw.byte, j->XILINXbase);
+			daa_set_mode(board, SOP_PU_CONVERSATION);
+			jifwait = jiffies + hertz;
+			while (time_before(jiffies, jifwait)) {
+				current->state = TASK_INTERRUPTIBLE;
+				schedule_timeout(1);
+			}
+			daa_int_read(board);
+			daa_set_mode(board, SOP_PU_SLEEP);
+			if (j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.VDD_OK) {
+				j->flags.pots_correct = 0;	// Should not be line voltage on POTS port.
+
+				LED_SetState(0x4, board);
+				j->pld_slicw.bits.rly3 = 0;
+				outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+			} else {
+				j->flags.pots_correct = 1;
+				LED_SetState(0x8, board);
+				j->pld_slicw.bits.rly1 = 1;
+				j->pld_slicw.bits.rly2 = 0;
+				j->pld_slicw.bits.rly3 = 0;
+				outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+			}
+		}
+	}
+	if (!j->flags.pstn_present) {
+		j->pld_slicw.bits.rly3 = 0;
+		outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+		daa_set_mode(board, SOP_PU_CONVERSATION);
+		jifwait = jiffies + hertz;
+		while (time_before(jiffies, jifwait)) {
+			current->state = TASK_INTERRUPTIBLE;
+			schedule_timeout(1);
+		}
+		daa_int_read(board);
+		daa_set_mode(board, SOP_PU_SLEEP);
+		if (j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.VDD_OK) {
+			j->flags.pstn_present = 1;
+		} else {
+			j->flags.pstn_present = 0;
+		}
+	}
+	if (j->flags.pstn_present) {
+		if (j->flags.pots_correct) {
+			LED_SetState(0xA, board);
+		} else {
+			LED_SetState(0x6, board);
+		}
+	} else {
+		if (j->flags.pots_correct) {
+			LED_SetState(0x9, board);
+		} else {
+			LED_SetState(0x5, board);
+		}
+	}
+	return j->flags.pstn_present;
+}
+
+static int ixj_selfprobe(int board)
+{
+	unsigned short cmd;
+	unsigned long jif;
+	BYTES bytes;
+	IXJ *j = &ixj[board];
+
+	if (ixjdebug > 0)
+		printk(KERN_INFO "Write IDLE to Software Control Register\n");
+
+	if (ixj_WriteDSPCommand(0x0000, board))		/* Write IDLE to Software Control Register */
+		return -1;
+
+// The read values of the SSR should be 0x00 for the IDLE command
+	if (j->ssr.low || j->ssr.high)
+		return -1;
+
+	if (ixjdebug > 0)
+		printk(KERN_INFO "Get Device ID Code\n");
+
+	if (ixj_WriteDSPCommand(0x3400, board))		/* Get Device ID Code */
+		return -1;
+
+	j->dsp.low = j->ssr.low;
+	j->dsp.high = j->ssr.high;
+
+	if (ixjdebug > 0)
+		printk(KERN_INFO "Get Device Version Code\n");
+
+	if (ixj_WriteDSPCommand(0x3800, board))		/* Get Device Version Code */
+		return -1;
+
+	j->ver.low = j->ssr.low;
+	j->ver.high = j->ssr.high;
+
+	if (!j->cardtype) {
+		if (j->dsp.low == 0x21) {
+//      j->XILINXbase = j->DSPbase + 0x10;
+			bytes.high = bytes.low = inb_p(j->XILINXbase + 0x02);
+			outb_p(bytes.low ^ 0xFF, j->XILINXbase + 0x02);
+      // Test for Internet LineJACK or Internet PhoneJACK Lite
+			bytes.low = inb_p(j->XILINXbase + 0x02);
+			if (bytes.low == bytes.high)	//  Register is read only on
+                                    //  Internet PhoneJack Lite
+			 {
+				j->cardtype = 400;	// Internet PhoneJACK Lite
+
+				if (check_region(j->XILINXbase, 4)) {
+					printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase);
+					return -1;
+				}
+				request_region(j->XILINXbase, 4, "ixj control");
+				j->pld_slicw.pcib.e1 = 1;
+				outb_p(j->pld_slicw.byte, j->XILINXbase);
+			} else {
+				j->cardtype = 300;	// Internet LineJACK
+
+				if (check_region(j->XILINXbase, 8)) {
+					printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase);
+					return -1;
+				}
+				request_region(j->XILINXbase, 8, "ixj control");
+			}
+		} else if (j->dsp.low == 0x22) {
+			j->cardtype = 500;	// Internet PhoneJACK PCI
+
+			request_region(j->XILINXbase, 4, "ixj control");
+			j->pld_slicw.pcib.e1 = 1;
+			outb_p(j->pld_slicw.byte, j->XILINXbase);
+		} else
+			j->cardtype = 100;	// Internet PhoneJACK
+
+	} else {
+		switch (j->cardtype) {
+		case 100:	// Internet PhoneJACK
+
+			if (!j->dsp.low != 0x20) {
+				j->dsp.high = 0x80;
+				j->dsp.low = 0x20;
+				ixj_WriteDSPCommand(0x3800, board);
+				j->ver.low = j->ssr.low;
+				j->ver.high = j->ssr.high;
+			}
+			break;
+		case 300:	// Internet LineJACK
+
+			if (check_region(j->XILINXbase, 8)) {
+				printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase);
+				return -1;
+			}
+			request_region(j->XILINXbase, 8, "ixj control");
+			break;
+		case 400:	//Internet PhoneJACK Lite
+
+		case 500:	//Internet PhoneJACK PCI
+
+			if (check_region(j->XILINXbase, 4)) {
+				printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase);
+				return -1;
+			}
+			request_region(j->XILINXbase, 4, "ixj control");
+			j->pld_slicw.pcib.e1 = 1;
+			outb_p(j->pld_slicw.byte, j->XILINXbase);
+			break;
+		}
+	}
+	if (j->dsp.low == 0x20 || j->cardtype == 400 || j->cardtype == 500) {
+		if (ixjdebug > 0)
+			printk(KERN_INFO "Write CODEC config to Software Control Register\n");
+
+		if (ixj_WriteDSPCommand(0xC462, board))		/* Write CODEC config to Software Control Register */
+			return -1;
+
+		if (ixjdebug > 0)
+			printk(KERN_INFO "Write CODEC timing to Software Control Register\n");
+
+		if (j->cardtype == 100) {
+			cmd = 0x9FF2;
+		} else {
+			cmd = 0x9FF5;
+		}
+		if (ixj_WriteDSPCommand(cmd, board))	/* Write CODEC timing to Software Control Register */
+			return -1;
+	} else {
+		if (set_base_frame(board, 30) != 30)
+			return -1;
+
+		if (j->cardtype == 300) {
+			if (ixjdebug > 0)
+				printk(KERN_INFO "Write CODEC config to Software Control Register\n");
+
+			if (ixj_WriteDSPCommand(0xC528, board))		/* Write CODEC config to Software Control Register */
+				return -1;
+
+			if (ixjdebug > 0)
+				printk(KERN_INFO "Turn on the PLD Clock at 8Khz\n");
+
+			j->pld_clock.byte = 0;
+			outb_p(j->pld_clock.byte, j->XILINXbase + 0x04);
+		}
+	}
+
+	if (j->dsp.low == 0x20) {
+		if (ixjdebug > 0)
+			printk(KERN_INFO "Configure GPIO pins\n");
+
+		j->gpio.bytes.high = 0x09;
+/*  bytes.low = 0xEF;  0xF7 */
+		j->gpio.bits.gpio1 = 1;
+		j->gpio.bits.gpio2 = 1;
+		j->gpio.bits.gpio3 = 0;
+		j->gpio.bits.gpio4 = 1;
+		j->gpio.bits.gpio5 = 1;
+		j->gpio.bits.gpio6 = 1;
+		j->gpio.bits.gpio7 = 1;
+		ixj_WriteDSPCommand(ixj[board].gpio.word, board);	/* Set GPIO pin directions */
+
+		if (ixjdebug > 0)
+			printk(KERN_INFO "Enable SLIC\n");
+
+		j->gpio.bytes.high = 0x0B;
+		j->gpio.bytes.low = 0x00;
+		j->gpio.bits.gpio1 = 0;
+		j->gpio.bits.gpio2 = 1;
+		j->gpio.bits.gpio5 = 0;
+		ixj_WriteDSPCommand(ixj[board].gpio.word, board);	/* send the ring stop signal */
+		j->port = PORT_POTS;
+	} else {
+		if (j->cardtype == 300) {
+			LED_SetState(0x1, board);
+			jif = jiffies + (hertz / 10);
+			while (time_before(jiffies, jif)) {
+				current->state = TASK_INTERRUPTIBLE;
+				schedule_timeout(1);
+			}
+			LED_SetState(0x2, board);
+			jif = jiffies + (hertz / 10);
+			while (time_before(jiffies, jif)) {
+				current->state = TASK_INTERRUPTIBLE;
+				schedule_timeout(1);
+			}
+			LED_SetState(0x4, board);
+			jif = jiffies + (hertz / 10);
+			while (time_before(jiffies, jif)) {
+				current->state = TASK_INTERRUPTIBLE;
+				schedule_timeout(1);
+			}
+			LED_SetState(0x8, board);
+			jif = jiffies + (hertz / 10);
+			while (time_before(jiffies, jif)) {
+				current->state = TASK_INTERRUPTIBLE;
+				schedule_timeout(1);
+			}
+			LED_SetState(0x0, board);
+
+			daa_get_version(board);
+
+			if (ixjdebug > 0)
+				printk("Loading DAA Coefficients\n");
+
+			DAA_Coeff_US(board);
+			if (!ixj_daa_write(board))
+				printk("DAA write failed on board %d\n", board);
+
+			ixj_daa_cid_reset(board);
+
+			j->flags.pots_correct = 0;
+			j->flags.pstn_present = 0;
+
+			ixj_linetest(board);
+
+			if (j->flags.pots_correct) {
+				j->pld_scrw.bits.daafsyncen = 0;	// Turn off DAA Frame Sync
+
+				outb_p(j->pld_scrw.byte, j->XILINXbase);
+				j->pld_slicw.bits.rly1 = 1;
+				j->pld_slicw.bits.spken = 1;
+				outb_p(j->pld_slicw.byte, j->XILINXbase + 0x01);
+				SLIC_SetState(PLD_SLIC_STATE_STANDBY, board);
+				j->port = PORT_POTS;
+			}
+			if (ixjdebug > 0)
+				printk(KERN_INFO "Enable Mixer\n");
+
+			ixj_mixer(0x0000, board);	//Master Volume Left unmute 0db
+
+			ixj_mixer(0x0100, board);	//Master Volume Right unmute 0db
+
+			ixj_mixer(0x0F00, board);	//Mono Out Volume unmute 0db
+
+			ixj_mixer(0x0C00, board);	//Mono1 Volume unmute 0db
+
+			ixj_mixer(0x0200, board);	//Voice Left Volume unmute 0db
+
+			ixj_mixer(0x0300, board);	//Voice Right Volume unmute 0db
+
+			ixj_mixer(0x110C, board);	//Voice Left and Right out
+
+			ixj_mixer(0x1401, board);	//Mono1 switch on mixer left
+
+			ixj_mixer(0x1501, board);	//Mono1 switch on mixer right
+
+			ixj_mixer(0x1700, board);	//Clock select
+
+			ixj_mixer(0x1800, board);	//ADC Source select
+
+		} else {
+			j->port = PORT_POTS;
+			SLIC_SetState(PLD_SLIC_STATE_STANDBY, board);
+		}
+	}
+
+	j->intercom = -1;
+	j->framesread = j->frameswritten = 0;
+	j->rxreadycheck = j->txreadycheck = 0;
+
+	if (ixj_WriteDSPCommand(0x0000, board))		/* Write IDLE to Software Control Register */
+		return -1;
+
+// The read values of the SSR should be 0x00 for the IDLE command
+	if (j->ssr.low || j->ssr.high)
+		return -1;
+
+	if (ixjdebug > 0)
+		printk(KERN_INFO "Enable Line Monitor\n");
+
+	if (ixjdebug > 0)
+		printk(KERN_INFO "Set Line Monitor to Asyncronous Mode\n");
+
+	if (ixj_WriteDSPCommand(0x7E01, board))		// Asynchronous Line Monitor
+
+		return -1;
+
+	if (ixjdebug > 0)
+		printk(KERN_INFO "Enable DTMF Detectors\n");
+
+	if (ixj_WriteDSPCommand(0x5151, board))		// Enable DTMF detection
+
+		return -1;
+
+	if (ixj_WriteDSPCommand(0x6E01, board))		// Set Asyncronous Tone Generation
+
+		return -1;
+
+	set_rec_depth(board, 2);	// Set Record Channel Limit to 2 frames
+
+	set_play_depth(board, 2);	// Set Playback Channel Limit to 2 frames
+
+	j->ex.bits.dtmf_ready = 0;
+	j->dtmf_state = 0;
+	j->dtmf_wp = ixj[board].dtmf_rp = 0;
+
+	j->rec_mode = ixj[board].play_mode = -1;
+	j->flags.ringing = 0;
+	j->maxrings = MAXRINGS;
+	j->ring_cadence = USA_RING_CADENCE;
+	j->drybuffer = 0;
+	j->winktime = 320;
+	j->flags.dtmf_oob = 0;
+
+	/* must be a device on the specified address */
+	/* Register with the Telephony for Linux subsystem */
+	j->p.f_op = &ixj_fops;
+	j->p.open = ixj_open;
+	phone_register_device(&j->p, PHONE_UNIT_ANY);
+
+	add_caps(board);
+
+	return 0;
+}
+
+int ixj_read_proc(char *buf, char **start, off_t offset, int len, int unused)
+{
+	int cnt;
+	IXJ *j;
+	len = 0;
+
+	len += sprintf(buf + len, "\n%s", ixj_c_rcsid);
+	len += sprintf(buf + len, "\n%s", ixj_h_rcsid);
+	len += sprintf(buf + len, "\n%s", ixjuser_h_rcsid);
+
+	for (cnt = 0; cnt < IXJMAX; cnt++) {
+		j = &ixj[cnt];
+		if (j->DSPbase) {
+			len += sprintf(buf + len, "\nCard Num %d", cnt);
+			len += sprintf(buf + len, "\nDSP Base Address 0x%4.4x", j->DSPbase);
+			if (j->cardtype != 100)
+				len += sprintf(buf + len, "\nXILINX Base Address 0x%4.4x", j->XILINXbase);
+			len += sprintf(buf + len, "\nDSP Type %2.2x%2.2x", j->dsp.high, j->dsp.low);
+			len += sprintf(buf + len, "\nDSP Version %2.2x.%2.2x", j->ver.high, j->ver.low);
+			len += sprintf(buf + len, "\nSerial Number %8.8x", j->serial);
+			switch (j->cardtype) {
+			case (100):
+				len += sprintf(buf + len, "\nCard Type = Internet PhoneJACK");
+				break;
+			case (300):
+				len += sprintf(buf + len, "\nCard Type = Internet LineJACK");
+				if (j->flags.g729_loaded)
+					len += sprintf(buf + len, " w/G.729 A/B");
+				break;
+			case (400):
+				len += sprintf(buf + len, "\nCard Type = Internet PhoneJACK Lite");
+				if (j->flags.g729_loaded)
+					len += sprintf(buf + len, " w/G.729 A/B");
+				break;
+			case (500):
+				len += sprintf(buf + len, "\nCard Type = Internet PhoneJACK PCI");
+				if (j->flags.g729_loaded)
+					len += sprintf(buf + len, " w/G.729 A/B");
+				break;
+			default:
+				len += sprintf(buf + len, "\nCard Type = %d", j->cardtype);
+				break;
+			}
+			len += sprintf(buf + len, "\nCapabilities %d", j->caps);
+			if (j->dsp.low != 0x20)
+				len += sprintf(buf + len, "\nDSP Processor load %d", j->proc_load);
+//    if(j->intercom != -1)
+			//      len += sprintf(buf+len, "\nIntercom call to board %2.2x", j->intercom);
+
+//    len += sprintf(buf+len, "\nRead buffer size %d", j->read_buffer_size);
+			//    len += sprintf(buf+len, "\nWrite buffer size %d", j->write_buffer_size);
+			len += sprintf(buf + len, "\nPlay CODEC ");
+			switch (j->play_codec) {
+			case G723_63:
+				len += sprintf(buf + len, "G.723.1 6.3");
+				break;
+			case G723_53:
+				len += sprintf(buf + len, "G.723.1 5.3");
+				break;
+			case TS85:
+				len += sprintf(buf + len, "TrueSpeech 8.5");
+				break;
+			case TS48:
+				len += sprintf(buf + len, "TrueSpeech 4.8");
+				break;
+			case TS41:
+				len += sprintf(buf + len, "TrueSpeech 4.1");
+				break;
+			case G728:
+				len += sprintf(buf + len, "G.728");
+				break;
+			case G729:
+				len += sprintf(buf + len, "G.729");
+				break;
+			case ULAW:
+				len += sprintf(buf + len, "uLaw");
+				break;
+			case ALAW:
+				len += sprintf(buf + len, "aLaw");
+				break;
+			case LINEAR16:
+				len += sprintf(buf + len, "16 bit Linear");
+				break;
+			case LINEAR8:
+				len += sprintf(buf + len, "8 bit Linear");
+				break;
+			case WSS:
+				len += sprintf(buf + len, "Windows Sound System");
+				break;
+			default:
+				len += sprintf(buf + len, "NO CODEC CHOSEN");
+				break;
+			}
+//    len += sprintf(buf+len, "\nPlay Frame Size %d", j->play_frame_size);
+			//    len += sprintf(buf+len, "\nInfo_write.convert_mode = %d", j->Info_write.convert_mode);
+			//    len += sprintf(buf+len, "\nInfo_write.convert_dir = %d", j->Info_write.convert_dir);
+			len += sprintf(buf + len, "\nRecord CODEC ");
+			switch (j->rec_codec) {
+			case G723_63:
+				len += sprintf(buf + len, "G.723.1 6.3");
+				break;
+			case G723_53:
+				len += sprintf(buf + len, "G.723.1 5.3");
+				break;
+			case TS85:
+				len += sprintf(buf + len, "TrueSpeech 8.5");
+				break;
+			case TS48:
+				len += sprintf(buf + len, "TrueSpeech 4.8");
+				break;
+			case TS41:
+				len += sprintf(buf + len, "TrueSpeech 4.1");
+				break;
+			case G728:
+				len += sprintf(buf + len, "G.728");
+				break;
+			case G729:
+				len += sprintf(buf + len, "G.729");
+				break;
+			case ULAW:
+				len += sprintf(buf + len, "uLaw");
+				break;
+			case ALAW:
+				len += sprintf(buf + len, "aLaw");
+				break;
+			case LINEAR16:
+				len += sprintf(buf + len, "16 bit Linear");
+				break;
+			case LINEAR8:
+				len += sprintf(buf + len, "8 bit Linear");
+				break;
+			case WSS:
+				len += sprintf(buf + len, "Windows Sound System");
+				break;
+			default:
+				len += sprintf(buf + len, "NO CODEC CHOSEN");
+				break;
+			}
+//    len += sprintf(buf+len, "\nRecord Frame Size %d", j->rec_frame_size);
+			switch (j->aec_level) {
+			case AEC_OFF:
+				len += sprintf(buf + len, "\n AEC OFF");
+				break;
+			case AEC_LOW:
+				len += sprintf(buf + len, "\n AEC LOW");
+				break;
+			case AEC_MED:
+				len += sprintf(buf + len, "\n AEC MED");
+				break;
+			case AEC_HIGH:
+				len += sprintf(buf + len, "\n AEC HIGH");
+				break;
+			}
+//    len += sprintf(buf+len, "\nInfo_read.convert_mode = %d", j->Info_read.convert_mode);
+			//    len += sprintf(buf+len, "\nInfo_read.convert_dir = %d", j->Info_read.convert_dir);
+			len += sprintf(buf + len, "\nHook state %d", j->r_hook);	// ixj_hookstate(cnt));
+
+			if (j->cardtype == 300) {
+				len += sprintf(buf + len, "\nPOTS Correct %d", j->flags.pots_correct);
+				len += sprintf(buf + len, "\nPSTN Present %d", j->flags.pstn_present);
+				len += sprintf(buf + len, "\nPOTS to PSTN %d", j->flags.pots_pstn);
+//      len += sprintf(buf+len, "\nDAA Interrupt flags %d", j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.reg);
+				//      len += sprintf(buf+len, "\nDAA version %d", j->m_DAAShadowRegs.SOP_REGS.SOP.cr5.reg);
+				switch (j->daa_mode) {
+				case SOP_PU_SLEEP:
+					len += sprintf(buf + len, "\nDAA PSTN On Hook");
+					break;
+				case SOP_PU_RINGING:
+					len += sprintf(buf + len, "\nDAA PSTN Ringing");
+					break;
+				case SOP_PU_CONVERSATION:
+					len += sprintf(buf + len, "\nDAA PSTN Off Hook");
+					break;
+				case SOP_PU_PULSEDIALING:
+					len += sprintf(buf + len, "\nDAA PSTN Pulse Dialing");
+					break;
+				}
+//      len += sprintf(buf+len, "\nDAA PSTN Ring flag = %d", j->pstn_ringing);
+			}
+			switch (j->port) {
+			case PORT_POTS:
+				len += sprintf(buf + len, "\nPort POTS");
+				break;
+			case PORT_PSTN:
+				len += sprintf(buf + len, "\nPort PSTN");
+				break;
+			case PORT_SPEAKER:
+				len += sprintf(buf + len, "\nPort SPEAKER/MIC");
+				break;
+			case PORT_HANDSET:
+				len += sprintf(buf + len, "\nPort HANDSET");
+				break;
+			}
+			if (j->dsp.low == 0x21 || j->dsp.low == 0x22) {
+				len += sprintf(buf + len, "\nSLIC state ");
+				switch (SLIC_GetState(cnt)) {
+				case PLD_SLIC_STATE_OC:
+					len += sprintf(buf + len, "OC");
+					break;
+				case PLD_SLIC_STATE_RINGING:
+					len += sprintf(buf + len, "RINGING");
+					break;
+				case PLD_SLIC_STATE_ACTIVE:
+					len += sprintf(buf + len, "ACTIVE");
+					break;
+				case PLD_SLIC_STATE_OHT:	// On-hook transmit
+
+					len += sprintf(buf + len, "OHT");
+					break;
+				case PLD_SLIC_STATE_TIPOPEN:
+					len += sprintf(buf + len, "TIPOPEN");
+					break;
+				case PLD_SLIC_STATE_STANDBY:
+					len += sprintf(buf + len, "STANDBY");
+					break;
+				case PLD_SLIC_STATE_APR:	// Active polarity reversal
+
+					len += sprintf(buf + len, "APR");
+					break;
+				case PLD_SLIC_STATE_OHTPR:	// OHT polarity reversal
+
+					len += sprintf(buf + len, "OHTPR");
+					break;
+				default:
+					len += sprintf(buf + len, "%d", SLIC_GetState(cnt));
+					break;
+				}
+			}
+//    len += sprintf(buf+len, "\nRead buffers ready %d", j->read_buffer_ready);
+			//    len += sprintf(buf+len, "\nWrite buffers empty %d",j->write_buffers_empty);
+
+//    len += sprintf(buf+len, "\nDTMF ready %d", j->ex.bits.dtmf_ready);
+			//    len += sprintf(buf+len, "\nDTMF proc %d", j->dtmf_proc);
+			//    len += sprintf(buf+len, "\nDTMF wp %d", j->dtmf_wp);
+			//    len += sprintf(buf+len, "\nDTMF rp %d", j->dtmf_rp);
+			//    len += sprintf(buf+len, "\nDTMF digits ");
+			//    for(x=j->dtmf_rp; x <j->dtmf_wp; x++)
+			//    {
+			//      if(x == 79)
+			//        x = 0;
+			//      len += sprintf(buf+len, "%x", j->dtmfbuffer[x]);
+			//    }
+#ifdef PERFMON_STATS
+			len += sprintf(buf + len, "\nTimer Checks %ld", j->timerchecks);
+
+			len += sprintf(buf + len, "\nRX Ready Checks %ld", j->rxreadycheck);
+			len += sprintf(buf + len, "\nTX Ready Checks %ld", j->txreadycheck);
+			len += sprintf(buf + len, "\nBase Frame %2.2x.%2.2x", j->baseframe.high, j->baseframe.low);
+			len += sprintf(buf + len, "\nFrames Read %ld", j->framesread);
+			len += sprintf(buf + len, "\nFrames Written %ld", j->frameswritten);
+			len += sprintf(buf + len, "\nDry Buffer %ld", j->drybuffer);
+			len += sprintf(buf + len, "\nRead Waits %ld", j->read_wait);
+			len += sprintf(buf + len, "\nWrite Waits %ld", j->write_wait);
+#endif
+			len += sprintf(buf + len, "\n");
+		}
+	}
+	return len;
+}
+struct proc_dir_entry ixj_proc_entry =
+{
+	0,
+	3, "ixj",
+	S_IFREG | S_IRUGO,
+	1, 0, 0,
+	0,
+	NULL,
+	&ixj_read_proc
+};
+
+#ifdef MODULE
+
+MODULE_DESCRIPTION("Internet PhoneJACK/Internet LineJACK module - www.quicknet.net");
+MODULE_AUTHOR("Ed Okerson <eokerson@quicknet.net>");
+
+void cleanup_module(void)
+{
+	int cnt;
+
+	del_timer(&ixj_timer);
+//  if (ixj_major)
+	//    unregister_chrdev(ixj_major, "ixj");
+	for (cnt = 0; cnt < IXJMAX; cnt++) {
+		if (ixj[cnt].cardtype == 300) {
+			ixj[cnt].pld_scrw.bits.daafsyncen = 0;	// Turn off DAA Frame Sync
+
+			outb_p(ixj[cnt].pld_scrw.byte, ixj[cnt].XILINXbase);
+			ixj[cnt].pld_slicw.bits.rly1 = 0;
+			ixj[cnt].pld_slicw.bits.rly2 = 0;
+			ixj[cnt].pld_slicw.bits.rly3 = 0;
+			outb_p(ixj[cnt].pld_slicw.byte, ixj[cnt].XILINXbase + 0x01);
+			LED_SetState(0x0, cnt);
+
+			release_region(ixj[cnt].XILINXbase, 8);
+		}
+		if (ixj[cnt].cardtype == 400 || ixj[cnt].cardtype == 500) {
+			release_region(ixj[cnt].XILINXbase, 4);
+		}
+		if (ixj[cnt].DSPbase) {
+			release_region(ixj[cnt].DSPbase, 16);
+			phone_unregister_device(&ixj[cnt].p);
+		}
+		if (ixj[cnt].read_buffer)
+			kfree(ixj[cnt].read_buffer);
+		if (ixj[cnt].write_buffer)
+			kfree(ixj[cnt].write_buffer);
+#ifdef CONFIG_ISAPNP
+		if (ixj[cnt].dev)
+			ixj[cnt].dev->deactivate(ixj[cnt].dev);
+#endif
+	}
+	proc_unregister(&proc_root, ixj_proc_entry.low_ino);
+}
+
+#endif
+
+// Typedefs
+typedef struct {
+	BYTE length;
+	DWORD bits;
+} DATABLOCK;
+
+static void PCIEE_WriteBit(WORD wEEPROMAddress, BYTE lastLCC, BYTE byData)
+{
+	lastLCC = lastLCC & 0xfb;
+	lastLCC = lastLCC | (byData ? 4 : 0);
+	outb(lastLCC, wEEPROMAddress);	//set data out bit as appropriate
+
+	udelay(1000);
+	lastLCC = lastLCC | 0x01;
+	outb(lastLCC, wEEPROMAddress);	//SK rising edge
+
+	byData = byData << 1;
+	lastLCC = lastLCC & 0xfe;
+
+	udelay(1000);
+	outb(lastLCC, wEEPROMAddress);	//after delay, SK falling edge
+
+}
+
+static BYTE PCIEE_ReadBit(WORD wEEPROMAddress, BYTE lastLCC)
+{
+	udelay(1000);
+	lastLCC = lastLCC | 0x01;
+	outb(lastLCC, wEEPROMAddress);	//SK rising edge
+
+	lastLCC = lastLCC & 0xfe;
+	udelay(1000);
+	outb(lastLCC, wEEPROMAddress);	//after delay, SK falling edge
+
+	return ((inb(wEEPROMAddress) >> 3) & 1);
+}
+
+static BOOL PCIEE_ReadWord(WORD wAddress, WORD wLoc, WORD * pwResult)
+{
+	BYTE lastLCC;
+	WORD wEEPROMAddress = wAddress + 3;
+	DWORD i;
+	BYTE byResult;
+
+	*pwResult = 0;
+
+	lastLCC = inb(wEEPROMAddress);
+
+	lastLCC = lastLCC | 0x02;
+	lastLCC = lastLCC & 0xfe;
+	outb(lastLCC, wEEPROMAddress);	// CS hi, SK lo
+
+	udelay(1000);		// delay
+
+	PCIEE_WriteBit(wEEPROMAddress, lastLCC, 1);
+	PCIEE_WriteBit(wEEPROMAddress, lastLCC, 1);
+	PCIEE_WriteBit(wEEPROMAddress, lastLCC, 0);
+
+	for (i = 0; i < 8; i++) {
+		PCIEE_WriteBit(wEEPROMAddress, lastLCC, wLoc & 0x80 ? 1 : 0);
+		wLoc <<= 1;
+	}
+
+	for (i = 0; i < 16; i++) {
+		byResult = PCIEE_ReadBit(wEEPROMAddress, lastLCC);
+		*pwResult = (*pwResult << 1) | byResult;
+	}
+
+	udelay(1000);		// another delay
+
+	lastLCC = lastLCC & 0xfd;
+	outb(lastLCC, wEEPROMAddress);	// negate CS
+
+	return 0;
+}
+
+static DWORD PCIEE_GetSerialNumber(WORD wAddress)
+{
+	WORD wLo, wHi;
+
+	if (PCIEE_ReadWord(wAddress, 62, &wLo))
+		return 0;
+
+	if (PCIEE_ReadWord(wAddress, 63, &wHi))
+		return 0;
+
+	return (((DWORD) wHi << 16) | wLo);
+}
+
+static int dspio[IXJMAX + 1] = {0,};
+static int xio[IXJMAX + 1] = {0,};
+
+MODULE_PARM(dspio, "1-" __MODULE_STRING(IXJMAX) "i");
+MODULE_PARM(xio, "1-" __MODULE_STRING(IXJMAX) "i");
+
+#ifdef MODULE
+int init_module(void)
+#else
+init __init ixj_init(void)
+#endif
+{
+	int result;
+
+	int func = 0x110, i = 0;
+	int cnt = 0;
+	int probe = 0;
+	struct pnp_dev *dev = NULL, *old_dev = NULL;
+	struct pci_dev *pci = NULL;
+
+#ifdef CONFIG_ISAPNP
+	while (1) {
+		do {
+			old_dev = dev;
+			dev = isapnp_find_dev(NULL, ISAPNP_VENDOR('Q', 'T', 'I'),
+					 ISAPNP_FUNCTION(func), old_dev);
+//(old_dev==NULL?NULL:old_dev));
+			if (!dev)
+				break;
+			printk("preparing %x\n", func);
+			result = dev->prepare(dev);
+			if (result < 0) {
+				printk("preparing failed %d \n", result);
+				break;
+			}
+			if (!(dev->resource[0].flags & IORESOURCE_IO))
+				return -ENODEV;
+			dev->resource[0].flags |= IORESOURCE_AUTO;
+			if (func != 0x110)
+				dev->resource[1].flags |= IORESOURCE_AUTO;
+			if (dev->activate(dev) < 0) {
+				printk("isapnp configure failed (out of resources?)\n");
+				return -ENOMEM;
+			}
+			ixj[cnt].DSPbase = dev->resource[0].start;	/* get real port */
+			if (func != 0x110)
+				ixj[cnt].XILINXbase = dev->resource[1].start;	/* get real port */
+
+			result = check_region(ixj[cnt].DSPbase, 16);
+			if (result) {
+				printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", ixj[cnt].DSPbase);
+				cleanup_module();
+				return result;
+			}
+			request_region(ixj[cnt].DSPbase, 16, "ixj DSP");
+			switch (func) {
+			case (0x110):
+				ixj[cnt].cardtype = 100;
+				break;
+			case (0x310):
+				ixj[cnt].cardtype = 300;
+				break;
+			case (0x410):
+				ixj[cnt].cardtype = 400;
+				break;
+			}
+			probe = ixj_selfprobe(cnt);
+
+			ixj[cnt].serial = dev->bus->serial;
+			ixj[cnt].dev = dev;
+			printk(KERN_INFO "ixj: found card at 0x%x\n", ixj[cnt].DSPbase);
+			cnt++;
+		} while (dev);
+
+		if (func == 0x410)
+			break;
+		if (func == 0x310)
+			func = 0x410;
+		if (func == 0x110)
+			func = 0x310;
+		dev = NULL;
+	}
+#else				//CONFIG_ISAPNP
+	/* Use passed parameters for older kernels without PnP */
+
+	for (cnt = 0; cnt < IXJMAX; cnt++) {
+		if (dspio[cnt]) {
+			ixj[cnt].DSPbase = dspio[cnt];
+			ixj[cnt].XILINXbase = xio[cnt];
+			ixj[cnt].cardtype = 0;
+			result = check_region(ixj[cnt].DSPbase, 16);
+			if (result) {
+				printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", ixj[cnt].DSPbase);
+				cleanup_module();
+				return result;
+			}
+			request_region(ixj[cnt].DSPbase, 16, "ixj DSP");
+			probe = ixj_selfprobe(cnt);
+			ixj[cnt].dev = NULL;
+		}
+	}
+#endif
+#ifdef CONFIG_PCI
+	if (pci_present()) {
+		for (i = 0; i < IXJMAX - cnt; i++) {
+			pci = pci_find_device(0x15E2, 0x0500, pci);
+			if (!pci)
+				break;
+			{
+				ixj[cnt].DSPbase = pci->base_address[0] & PCI_BASE_ADDRESS_IO_MASK;
+				ixj[cnt].XILINXbase = ixj[cnt].DSPbase + 0x10;
+				ixj[cnt].serial = PCIEE_GetSerialNumber(pci->base_address[2] & PCI_BASE_ADDRESS_IO_MASK);
+
+				result = check_region(ixj[cnt].DSPbase, 16);
+				if (result) {
+					printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", ixj[cnt].DSPbase);
+					cleanup_module();
+					return result;
+				}
+				request_region(ixj[cnt].DSPbase, 16, "ixj DSP");
+				ixj[cnt].cardtype = 500;
+				probe = ixj_selfprobe(cnt);
+				cnt++;
+			}
+		}
+	}
+#endif
+	printk("%s\n", ixj_c_rcsid);
+
+//  result = register_chrdev(ixj_major, "ixj", &ixj_fops);
+	//  if (result < 0) {
+	//    printk(KERN_INFO "ixj: can't get major number\n");
+	//    cleanup_module();
+	//    return result;
+	//  }
+	//  if (ixj_major == 0)
+	//    ixj_major = result;               /* dynamic */
+
+	proc_register(&proc_root, &ixj_proc_entry);
+
+	ixj_init_timer();
+
+	return probe;
+}
+
+static void DAA_Coeff_US(int board)
+{
+	IXJ *j = &ixj[board];
+
+	int i;
+
+	//-----------------------------------------------
+	// CAO
+	for (i = 0; i < ALISDAA_CALLERID_SIZE; i++) {
+		j->m_DAAShadowRegs.CAO_REGS.CAO.CallerID[i] = 0;
+	}
+
+	// Bytes for IM-filter part 1 (04): 0E,32,E2,2F,C2,5A,C0,00
+	    j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[7] = 0x0E;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[6] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[5] = 0xE2;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[4] = 0x2F;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[3] = 0xC2;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[2] = 0x5A;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[1] = 0xC0;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[0] = 0x00;
+
+// Bytes for IM-filter part 2 (05): 72,85,00,0E,2B,3A,D0,08
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[7] = 0x72;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[6] = 0x85;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[5] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[4] = 0x0E;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[3] = 0x2B;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[2] = 0x3A;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[1] = 0xD0;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[0] = 0x08;
+
+// Bytes for FRX-filter       (08): 03,8F,48,F2,8F,48,70,08
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[7] = 0x03;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[6] = 0x8F;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[5] = 0x48;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[4] = 0xF2;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[3] = 0x8F;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[2] = 0x48;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[1] = 0x70;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[0] = 0x08;
+
+// Bytes for FRR-filter       (07): 04,8F,38,7F,9B,EA,B0,08
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[7] = 0x04;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[6] = 0x8F;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[5] = 0x38;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[4] = 0x7F;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[3] = 0x9B;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[2] = 0xEA;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[1] = 0xB0;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[0] = 0x08;
+
+// Bytes for AX-filter        (0A): 16,55,DD,CA
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[3] = 0x16;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[2] = 0x55;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[1] = 0xDD;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[0] = 0xCA;
+
+// Bytes for AR-filter        (09): 52,D3,11,42
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[3] = 0x52;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[2] = 0xD3;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[1] = 0x11;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[0] = 0x42;
+
+// Bytes for TH-filter part 1 (00): 00,42,48,81,B3,80,00,98
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[7] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[6] = 0x42;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[5] = 0x48;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[4] = 0x81;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[3] = 0xB3;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[2] = 0x80;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[1] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[0] = 0x98;
+
+// Bytes for TH-filter part 2 (01): 02,F2,33,A0,68,AB,8A,AD
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[7] = 0x02;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[6] = 0xF2;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[5] = 0x33;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[4] = 0xA0;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[3] = 0x68;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[2] = 0xAB;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[1] = 0x8A;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[0] = 0xAD;
+
+// Bytes for TH-filter part 3 (02): 00,88,DA,54,A4,BA,2D,BB
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[7] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[6] = 0x88;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[5] = 0xDA;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[4] = 0x54;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[3] = 0xA4;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[2] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[1] = 0x2D;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[0] = 0xBB;
+
+// ;  (10K, 0.68uF)
+	// 
+	// Bytes for Ringing part 1 (03):1B,3B,9B,BA,D4,1C,B3,23
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[7] = 0x1B;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[6] = 0x3B;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[5] = 0x9B;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[4] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[3] = 0xD4;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[2] = 0x1C;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[1] = 0xB3;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[0] = 0x23;
+
+// Bytes for Ringing part 2 (06):13,42,A6,BA,D4,73,CA,D5
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[7] = 0x13;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[6] = 0x42;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[5] = 0xA6;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[4] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[3] = 0xD4;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[2] = 0x73;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[1] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[0] = 0xD5;
+
+// 
+	// Levelmetering Ringing        (0D):B2,45,0F,8E      
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[3] = 0xB2;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[2] = 0x45;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[1] = 0x0F;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[0] = 0x8E;
+
+// Caller ID 1st Tone           (0E):CA,0E,CA,09,99,99,99,99
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[7] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[6] = 0x0E;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[5] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[4] = 0x09;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[3] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[2] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[1] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[0] = 0x99;
+
+// Caller ID 2nd Tone           (0F):FD,B5,BA,07,DA,00,00,00
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[7] = 0xFD;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[6] = 0xB5;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[5] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[4] = 0x07;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[3] = 0xDA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[2] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[1] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[0] = 0x00;
+
+// 
+	// ;CR Registers
+	// Config. Reg. 0 (filters)       (cr0):FE ; CLK gen. by crystal
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg = 0xFE;
+
+// Config. Reg. 1 (dialing)       (cr1):05
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.reg = 0x05;
+
+// Config. Reg. 2 (caller ID)     (cr2):04
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr2.reg = 0x04;
+
+// Config. Reg. 3 (testloops)     (cr3):03 ; SEL Bit==0, HP-disabled
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr3.reg = 0x03;
+
+// Config. Reg. 4 (analog gain)   (cr4):01
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg = 0x02;		//0x01;
+
+// Config. Reg. 5 (Version)       (cr5):02
+	// Config. Reg. 6 (Reserved)      (cr6):00
+	// Config. Reg. 7 (Reserved)      (cr7):00
+	// 
+
+// ;xr Registers
+	// Ext. Reg. 0 (Interrupt Reg.)   (xr0):02
+	j->m_DAAShadowRegs.XOP_xr0_W.reg = 0x02;	// SO_1 set to '1' because it is inverted.
+
+// Ext. Reg. 1 (Interrupt enable) (xr1):1C // Cadence, RING, Caller ID, VDD_OK
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr1.reg = 0x3C;
+
+// Ext. Reg. 2 (Cadence Time Out) (xr2):7D
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr2.reg = 0x7D;
+
+// Ext. Reg. 3 (DC Char)          (xr3):32 ; B-Filter Off == 1
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr3.reg = 0x12;		//0x32;
+
+// Ext. Reg. 4 (Cadence)          (xr4):00
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr4.reg = 0x00;
+
+// Ext. Reg. 5 (Ring timer)       (xr5):22
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr5.reg = 0x22;
+
+// Ext. Reg. 6 (Power State)      (xr6):00
+	j->m_DAAShadowRegs.XOP_xr6_W.reg = 0x00;
+
+// Ext. Reg. 7 (Vdd)              (xr7):40
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr7.reg = 0x40;		// 0x40 ??? Should it be 0x00?
+
+// 
+	// DTMF Tone 1                     (0B): 11,B3,5A,2C ;   697 Hz  
+	//                                       12,33,5A,C3 ;  770 Hz  
+	//                                       13,3C,5B,32 ;  852 Hz  
+	//                                       1D,1B,5C,CC ;  941 Hz  
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[3] = 0x11;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[2] = 0xB3;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[1] = 0x5A;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[0] = 0x2C;
+
+// DTMF Tone 2                     (0C): 32,32,52,B3 ;  1209 Hz  
+	//                                       EC,1D,52,22 ;  1336 Hz  
+	//                                       AA,AC,51,D2 ;  1477 Hz  
+	//                                       9B,3B,51,25 ;  1633 Hz  
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[3] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[2] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[1] = 0x52;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[0] = 0xB3;
+
+}
+
+static void DAA_Coeff_UK(int board)
+{
+	IXJ *j = &ixj[board];
+
+	int i;
+
+	//-----------------------------------------------
+	// CAO
+	for (i = 0; i < ALISDAA_CALLERID_SIZE; i++) {
+		j->m_DAAShadowRegs.CAO_REGS.CAO.CallerID[i] = 0;
+	}
+
+	//  Bytes for IM-filter part 1 (04): 00,C2,BB,A8,CB,81,A0,00
+	    j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[7] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[6] = 0xC2;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[5] = 0xBB;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[4] = 0xA8;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[3] = 0xCB;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[2] = 0x81;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[1] = 0xA0;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[0] = 0x00;
+
+	// Bytes for IM-filter part 2 (05): 40,00,00,0A,A4,33,E0,08
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[7] = 0x40;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[6] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[5] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[4] = 0x0A;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[3] = 0xA4;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[2] = 0x33;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[1] = 0xE0;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[0] = 0x08;
+
+// Bytes for FRX-filter       (08): 07,9B,ED,24,B2,A2,A0,08
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[7] = 0x07;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[6] = 0x9B;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[5] = 0xED;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[4] = 0x24;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[3] = 0xB2;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[2] = 0xA2;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[1] = 0xA0;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[0] = 0x08;
+
+// Bytes for FRR-filter       (07): 0F,92,F2,B2,87,D2,30,08
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[7] = 0x0F;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[6] = 0x92;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[5] = 0xF2;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[4] = 0xB2;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[3] = 0x87;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[2] = 0xD2;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[1] = 0x30;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[0] = 0x08;
+
+// Bytes for AX-filter        (0A): 1B,A5,DD,CA
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[3] = 0x1B;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[2] = 0xA5;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[1] = 0xDD;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[0] = 0xCA;
+
+// Bytes for AR-filter        (09): E2,27,10,D6
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[3] = 0xE2;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[2] = 0x27;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[1] = 0x10;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[0] = 0xD6;
+
+// Bytes for TH-filter part 1 (00): 80,2D,38,8B,D0,00,00,98
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[7] = 0x80;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[6] = 0x2D;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[5] = 0x38;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[4] = 0x8B;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[3] = 0xD0;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[2] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[1] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[0] = 0x98;
+
+// Bytes for TH-filter part 2 (01): 02,5A,53,F0,0B,5F,84,D4
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[7] = 0x02;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[6] = 0x5A;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[5] = 0x53;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[4] = 0xF0;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[3] = 0x0B;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[2] = 0x5F;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[1] = 0x84;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[0] = 0xD4;
+
+// Bytes for TH-filter part 3 (02): 00,88,6A,A4,8F,52,F5,32
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[7] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[6] = 0x88;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[5] = 0x6A;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[4] = 0xA4;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[3] = 0x8F;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[2] = 0x52;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[1] = 0xF5;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[0] = 0x32;
+
+// ; idle
+
+// Bytes for Ringing part 1 (03):1B,3C,93,3A,22,12,A3,23
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[7] = 0x1B;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[6] = 0x3C;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[5] = 0x93;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[4] = 0x3A;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[3] = 0x22;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[2] = 0x12;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[1] = 0xA3;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[0] = 0x23;
+
+// Bytes for Ringing part 2 (06):12,A2,A6,BA,22,7A,0A,D5
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[7] = 0x12;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[6] = 0xA2;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[5] = 0xA6;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[4] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[3] = 0x22;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[2] = 0x7A;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[1] = 0x0A;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[0] = 0xD5;
+
+// Levelmetering Ringing           (0D):AA,35,0F,8E     ; 25Hz 30V less possible?
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[3] = 0xAA;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[2] = 0x35;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[1] = 0x0F;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[0] = 0x8E;
+
+// Caller ID 1st Tone              (0E):CA,0E,CA,09,99,99,99,99
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[7] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[6] = 0x0E;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[5] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[4] = 0x09;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[3] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[2] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[1] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[0] = 0x99;
+
+// Caller ID 2nd Tone              (0F):FD,B5,BA,07,DA,00,00,00
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[7] = 0xFD;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[6] = 0xB5;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[5] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[4] = 0x07;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[3] = 0xDA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[2] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[1] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[0] = 0x00;
+
+// ;CR Registers
+	// Config. Reg. 0 (filters)        (cr0):FF
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg = 0xFF;		//0xFE;
+
+// Config. Reg. 1 (dialing)        (cr1):05
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.reg = 0x05;
+
+// Config. Reg. 2 (caller ID)      (cr2):04
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr2.reg = 0x04;
+
+// Config. Reg. 3 (testloops)      (cr3):00        ; 
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr3.reg = 0x00;
+
+// Config. Reg. 4 (analog gain)    (cr4):01
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg = 0x02;		//0x01;
+
+// Config. Reg. 5 (Version)        (cr5):02
+	// Config. Reg. 6 (Reserved)       (cr6):00
+	// Config. Reg. 7 (Reserved)       (cr7):00
+
+// ;xr Registers
+	// Ext. Reg. 0 (Interrupt Reg.)    (xr0):02
+	j->m_DAAShadowRegs.XOP_xr0_W.reg = 0x02;	// SO_1 set to '1' because it is inverted.
+
+// Ext. Reg. 1 (Interrupt enable)  (xr1):1C
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr1.reg = 0x1C;		// RING, Caller ID, VDD_OK
+
+// Ext. Reg. 2 (Cadence Time Out)  (xr2):7D
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr2.reg = 0x7D;
+
+// Ext. Reg. 3 (DC Char)           (xr3):36        ; 
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr3.reg = 0x36;
+
+// Ext. Reg. 4 (Cadence)           (xr4):00
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr4.reg = 0x00;
+
+// Ext. Reg. 5 (Ring timer)        (xr5):22
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr5.reg = 0x22;
+
+// Ext. Reg. 6 (Power State)       (xr6):00
+	j->m_DAAShadowRegs.XOP_xr6_W.reg = 0x00;
+
+// Ext. Reg. 7 (Vdd)               (xr7):46
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr7.reg = 0x46;		// 0x46 ??? Should it be 0x00?
+
+// DTMF Tone 1                     (0B): 11,B3,5A,2C    ;   697 Hz  
+	//                                       12,33,5A,C3    ;  770 Hz  
+	//                                       13,3C,5B,32    ;  852 Hz  
+	//                                       1D,1B,5C,CC    ;  941 Hz  
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[3] = 0x11;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[2] = 0xB3;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[1] = 0x5A;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[0] = 0x2C;
+
+// DTMF Tone 2                     (0C): 32,32,52,B3    ;  1209 Hz  
+	//                                       EC,1D,52,22    ;  1336 Hz  
+	//                                       AA,AC,51,D2    ;  1477 Hz  
+	//                                       9B,3B,51,25    ;  1633 Hz  
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[3] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[2] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[1] = 0x52;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[0] = 0xB3;
+
+}
+
+
+static void DAA_Coeff_France(int board)
+{
+	IXJ *j = &ixj[board];
+
+	int i;
+
+	//-----------------------------------------------
+	// CAO
+	for (i = 0; i < ALISDAA_CALLERID_SIZE; i++) {
+		j->m_DAAShadowRegs.CAO_REGS.CAO.CallerID[i] = 0;
+	}
+
+	// Bytes for IM-filter part 1 (04): 02,A2,43,2C,22,AF,A0,00
+	    j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[7] = 0x02;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[6] = 0xA2;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[5] = 0x43;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[4] = 0x2C;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[3] = 0x22;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[2] = 0xAF;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[1] = 0xA0;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[0] = 0x00;
+
+// Bytes for IM-filter part 2 (05): 67,CE,00,0C,22,33,E0,08
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[7] = 0x67;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[6] = 0xCE;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[5] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[4] = 0x2C;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[3] = 0x22;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[2] = 0x33;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[1] = 0xE0;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[0] = 0x08;
+
+// Bytes for FRX-filter       (08): 07,9A,28,F6,23,4A,B0,08
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[7] = 0x07;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[6] = 0x9A;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[5] = 0x28;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[4] = 0xF6;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[3] = 0x23;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[2] = 0x4A;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[1] = 0xB0;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[0] = 0x08;
+
+// Bytes for FRR-filter       (07): 03,8F,F9,2F,9E,FA,20,08
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[7] = 0x03;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[6] = 0x8F;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[5] = 0xF9;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[4] = 0x2F;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[3] = 0x9E;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[2] = 0xFA;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[1] = 0x20;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[0] = 0x08;
+
+// Bytes for AX-filter        (0A): 16,B5,DD,CA
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[3] = 0x16;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[2] = 0xB5;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[1] = 0xDD;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[0] = 0xCA;
+
+// Bytes for AR-filter        (09): 52,C7,10,D6
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[3] = 0xE2;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[2] = 0xC7;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[1] = 0x10;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[0] = 0xD6;
+
+// Bytes for TH-filter part 1 (00): 00,42,48,81,A6,80,00,98
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[7] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[6] = 0x42;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[5] = 0x48;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[4] = 0x81;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[3] = 0xA6;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[2] = 0x80;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[1] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[0] = 0x98;
+
+// Bytes for TH-filter part 2 (01): 02,AC,2A,30,78,AC,8A,2C
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[7] = 0x02;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[6] = 0xAC;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[5] = 0x2A;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[4] = 0x30;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[3] = 0x78;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[2] = 0xAC;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[1] = 0x8A;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[0] = 0x2C;
+
+// Bytes for TH-filter part 3 (02): 00,88,DA,A5,22,BA,2C,45
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[7] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[6] = 0x88;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[5] = 0xDA;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[4] = 0xA5;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[3] = 0x22;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[2] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[1] = 0x2C;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[0] = 0x45;
+
+// ; idle
+
+// Bytes for Ringing part 1 (03):1B,3C,93,3A,22,12,A3,23
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[7] = 0x1B;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[6] = 0x3C;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[5] = 0x93;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[4] = 0x3A;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[3] = 0x22;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[2] = 0x12;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[1] = 0xA3;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[0] = 0x23;
+
+// Bytes for Ringing part 2 (06):12,A2,A6,BA,22,7A,0A,D5
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[7] = 0x12;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[6] = 0xA2;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[5] = 0xA6;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[4] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[3] = 0x22;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[2] = 0x7A;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[1] = 0x0A;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[0] = 0xD5;
+
+// Levelmetering Ringing           (0D):32,45,B5,84     ; 50Hz 20V
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[3] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[2] = 0x45;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[1] = 0xB5;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[0] = 0x84;
+
+// Caller ID 1st Tone              (0E):CA,0E,CA,09,99,99,99,99
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[7] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[6] = 0x0E;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[5] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[4] = 0x09;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[3] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[2] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[1] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[0] = 0x99;
+
+// Caller ID 2nd Tone              (0F):FD,B5,BA,07,DA,00,00,00
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[7] = 0xFD;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[6] = 0xB5;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[5] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[4] = 0x07;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[3] = 0xDA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[2] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[1] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[0] = 0x00;
+
+// ;CR Registers
+	// Config. Reg. 0 (filters)        (cr0):FF
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg = 0xFF;
+
+// Config. Reg. 1 (dialing)        (cr1):05
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.reg = 0x05;
+
+// Config. Reg. 2 (caller ID)      (cr2):04
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr2.reg = 0x04;
+
+// Config. Reg. 3 (testloops)      (cr3):00        ; 
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr3.reg = 0x00;
+
+// Config. Reg. 4 (analog gain)    (cr4):01
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg = 0x02;		//0x01;
+
+// Config. Reg. 5 (Version)        (cr5):02
+	// Config. Reg. 6 (Reserved)       (cr6):00
+	// Config. Reg. 7 (Reserved)       (cr7):00
+
+// ;xr Registers
+	// Ext. Reg. 0 (Interrupt Reg.)    (xr0):02
+	j->m_DAAShadowRegs.XOP_xr0_W.reg = 0x02;	// SO_1 set to '1' because it is inverted.
+
+// Ext. Reg. 1 (Interrupt enable)  (xr1):1C
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr1.reg = 0x1C;		// RING, Caller ID, VDD_OK
+
+// Ext. Reg. 2 (Cadence Time Out)  (xr2):7D
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr2.reg = 0x7D;
+
+// Ext. Reg. 3 (DC Char)           (xr3):36        ; 
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr3.reg = 0x36;
+
+// Ext. Reg. 4 (Cadence)           (xr4):00
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr4.reg = 0x00;
+
+// Ext. Reg. 5 (Ring timer)        (xr5):22
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr5.reg = 0x22;
+
+// Ext. Reg. 6 (Power State)       (xr6):00
+	j->m_DAAShadowRegs.XOP_xr6_W.reg = 0x00;
+
+// Ext. Reg. 7 (Vdd)               (xr7):46
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr7.reg = 0x46;		// 0x46 ??? Should it be 0x00?
+
+// DTMF Tone 1                     (0B): 11,B3,5A,2C    ;   697 Hz  
+	//                                       12,33,5A,C3    ;  770 Hz  
+	//                                       13,3C,5B,32    ;  852 Hz  
+	//                                       1D,1B,5C,CC    ;  941 Hz  
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[3] = 0x11;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[2] = 0xB3;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[1] = 0x5A;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[0] = 0x2C;
+
+// DTMF Tone 2                     (0C): 32,32,52,B3    ;  1209 Hz  
+	//                                       EC,1D,52,22    ;  1336 Hz  
+	//                                       AA,AC,51,D2    ;  1477 Hz  
+	//                                       9B,3B,51,25    ;  1633 Hz  
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[3] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[2] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[1] = 0x52;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[0] = 0xB3;
+
+}
+
+
+static void DAA_Coeff_Germany(int board)
+{
+	IXJ *j = &ixj[board];
+
+	int i;
+
+	//-----------------------------------------------
+	// CAO
+	for (i = 0; i < ALISDAA_CALLERID_SIZE; i++) {
+		j->m_DAAShadowRegs.CAO_REGS.CAO.CallerID[i] = 0;
+	}
+
+	// Bytes for IM-filter part 1 (04): 00,CE,BB,B8,D2,81,B0,00
+	    j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[7] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[6] = 0xCE;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[5] = 0xBB;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[4] = 0xB8;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[3] = 0xD2;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[2] = 0x81;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[1] = 0xB0;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[0] = 0x00;
+
+// Bytes for IM-filter part 2 (05): 45,8F,00,0C,D2,3A,D0,08
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[7] = 0x45;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[6] = 0x8F;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[5] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[4] = 0x0C;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[3] = 0xD2;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[2] = 0x3A;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[1] = 0xD0;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[0] = 0x08;
+
+// Bytes for FRX-filter       (08): 07,AA,E2,34,24,89,20,08
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[7] = 0x07;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[6] = 0xAA;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[5] = 0xE2;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[4] = 0x34;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[3] = 0x24;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[2] = 0x89;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[1] = 0x20;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[0] = 0x08;
+
+// Bytes for FRR-filter       (07): 02,87,FA,37,9A,CA,B0,08
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[7] = 0x02;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[6] = 0x87;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[5] = 0xFA;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[4] = 0x37;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[3] = 0x9A;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[2] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[1] = 0xB0;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[0] = 0x08;
+
+// Bytes for AX-filter        (0A): 72,D5,DD,CA
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[3] = 0x72;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[2] = 0xD5;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[1] = 0xDD;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[0] = 0xCA;
+
+// Bytes for AR-filter        (09): 72,42,13,4B
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[3] = 0x72;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[2] = 0x42;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[1] = 0x13;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[0] = 0x4B;
+
+// Bytes for TH-filter part 1 (00): 80,52,48,81,AD,80,00,98
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[7] = 0x80;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[6] = 0x52;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[5] = 0x48;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[4] = 0x81;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[3] = 0xAD;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[2] = 0x80;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[1] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[0] = 0x98;
+
+// Bytes for TH-filter part 2 (01): 02,42,5A,20,E8,1A,81,27
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[7] = 0x02;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[6] = 0x42;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[5] = 0x5A;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[4] = 0x20;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[3] = 0xE8;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[2] = 0x1A;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[1] = 0x81;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[0] = 0x27;
+
+// Bytes for TH-filter part 3 (02): 00,88,63,26,BD,4B,A3,C2
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[7] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[6] = 0x88;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[5] = 0x63;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[4] = 0x26;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[3] = 0xBD;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[2] = 0x4B;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[1] = 0xA3;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[0] = 0xC2;
+
+// ;  (10K, 0.68uF)
+
+// Bytes for Ringing part 1 (03):1B,3B,9B,BA,D4,1C,B3,23
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[7] = 0x1B;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[6] = 0x3B;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[5] = 0x9B;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[4] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[3] = 0xD4;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[2] = 0x1C;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[1] = 0xB3;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[0] = 0x23;
+
+// Bytes for Ringing part 2 (06):13,42,A6,BA,D4,73,CA,D5
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[7] = 0x13;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[6] = 0x42;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[5] = 0xA6;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[4] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[3] = 0xD4;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[2] = 0x73;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[1] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[0] = 0xD5;
+
+// Levelmetering Ringing        (0D):B2,45,0F,8E      
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[3] = 0xB2;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[2] = 0x45;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[1] = 0x0F;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[0] = 0x8E;
+
+// Caller ID 1st Tone           (0E):CA,0E,CA,09,99,99,99,99
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[7] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[6] = 0x0E;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[5] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[4] = 0x09;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[3] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[2] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[1] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[0] = 0x99;
+
+// Caller ID 2nd Tone           (0F):FD,B5,BA,07,DA,00,00,00
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[7] = 0xFD;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[6] = 0xB5;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[5] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[4] = 0x07;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[3] = 0xDA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[2] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[1] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[0] = 0x00;
+
+// ;CR Registers
+	// Config. Reg. 0 (filters)        (cr0):FF ; all Filters enabled, CLK from ext. source
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg = 0xFF;
+
+// Config. Reg. 1 (dialing)        (cr1):05 ; Manual Ring, Ring metering enabled
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.reg = 0x05;
+
+// Config. Reg. 2 (caller ID)      (cr2):04 ; Analog Gain 0dB, FSC internal
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr2.reg = 0x04;
+
+// Config. Reg. 3 (testloops)      (cr3):00 ; SEL Bit==0, HP-enabled
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr3.reg = 0x00;
+
+// Config. Reg. 4 (analog gain)    (cr4):01
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg = 0x02;		//0x01;
+
+// Config. Reg. 5 (Version)        (cr5):02
+	// Config. Reg. 6 (Reserved)       (cr6):00
+	// Config. Reg. 7 (Reserved)       (cr7):00
+
+// ;xr Registers
+	// Ext. Reg. 0 (Interrupt Reg.)    (xr0):02
+	j->m_DAAShadowRegs.XOP_xr0_W.reg = 0x02;	// SO_1 set to '1' because it is inverted.
+
+// Ext. Reg. 1 (Interrupt enable)  (xr1):1C ; Ring, CID, VDDOK Interrupts enabled
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr1.reg = 0x1C;		// RING, Caller ID, VDD_OK
+
+// Ext. Reg. 2 (Cadence Time Out)  (xr2):7D
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr2.reg = 0x7D;
+
+// Ext. Reg. 3 (DC Char)           (xr3):32 ; B-Filter Off==1, U0=3.5V, R=200Ohm
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr3.reg = 0x32;
+
+// Ext. Reg. 4 (Cadence)           (xr4):00
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr4.reg = 0x00;
+
+// Ext. Reg. 5 (Ring timer)        (xr5):22
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr5.reg = 0x22;
+
+// Ext. Reg. 6 (Power State)       (xr6):00
+	j->m_DAAShadowRegs.XOP_xr6_W.reg = 0x00;
+
+// Ext. Reg. 7 (Vdd)               (xr7):40 ; VDD=4.25 V
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr7.reg = 0x40;		// 0x40 ??? Should it be 0x00?
+
+// DTMF Tone 1                     (0B): 11,B3,5A,2C    ;   697 Hz  
+	//                                       12,33,5A,C3    ;  770 Hz  
+	//                                       13,3C,5B,32    ;  852 Hz  
+	//                                       1D,1B,5C,CC    ;  941 Hz  
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[3] = 0x11;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[2] = 0xB3;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[1] = 0x5A;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[0] = 0x2C;
+
+// DTMF Tone 2                     (0C): 32,32,52,B3    ;  1209 Hz  
+	//                                       EC,1D,52,22    ;  1336 Hz  
+	//                                       AA,AC,51,D2    ;  1477 Hz  
+	//                                       9B,3B,51,25    ;  1633 Hz  
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[3] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[2] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[1] = 0x52;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[0] = 0xB3;
+
+}
+
+
+static void DAA_Coeff_Australia(int board)
+{
+	IXJ *j = &ixj[board];
+
+	int i;
+
+	//-----------------------------------------------
+	// CAO
+	for (i = 0; i < ALISDAA_CALLERID_SIZE; i++) {
+		j->m_DAAShadowRegs.CAO_REGS.CAO.CallerID[i] = 0;
+	}
+
+	// Bytes for IM-filter part 1 (04): 00,A3,AA,28,B3,82,D0,00
+	    j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[7] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[6] = 0xA3;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[5] = 0xAA;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[4] = 0x28;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[3] = 0xB3;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[2] = 0x82;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[1] = 0xD0;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[0] = 0x00;
+
+// Bytes for IM-filter part 2 (05): 70,96,00,09,32,6B,C0,08
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[7] = 0x70;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[6] = 0x96;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[5] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[4] = 0x09;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[3] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[2] = 0x6B;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[1] = 0xC0;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[0] = 0x08;
+
+// Bytes for FRX-filter       (08): 07,96,E2,34,32,9B,30,08
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[7] = 0x07;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[6] = 0x96;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[5] = 0xE2;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[4] = 0x34;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[3] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[2] = 0x9B;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[1] = 0x30;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[0] = 0x08;
+
+// Bytes for FRR-filter       (07): 0F,9A,E9,2F,22,CC,A0,08
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[7] = 0x0F;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[6] = 0x9A;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[5] = 0xE9;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[4] = 0x2F;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[3] = 0x22;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[2] = 0xCC;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[1] = 0xA0;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[0] = 0x08;
+
+// Bytes for AX-filter        (0A): CB,45,DD,CA
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[3] = 0xCB;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[2] = 0x45;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[1] = 0xDD;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[0] = 0xCA;
+
+// Bytes for AR-filter        (09): 1B,67,10,D6
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[3] = 0x1B;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[2] = 0x67;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[1] = 0x10;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[0] = 0xD6;
+
+// Bytes for TH-filter part 1 (00): 80,52,48,81,AF,80,00,98
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[7] = 0x80;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[6] = 0x52;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[5] = 0x48;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[4] = 0x81;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[3] = 0xAF;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[2] = 0x80;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[1] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[0] = 0x98;
+
+// Bytes for TH-filter part 2 (01): 02,DB,52,B0,38,01,82,AC
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[7] = 0x02;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[6] = 0xDB;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[5] = 0x52;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[4] = 0xB0;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[3] = 0x38;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[2] = 0x01;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[1] = 0x82;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[0] = 0xAC;
+
+// Bytes for TH-filter part 3 (02): 00,88,4A,3E,2C,3B,24,46
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[7] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[6] = 0x88;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[5] = 0x4A;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[4] = 0x3E;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[3] = 0x2C;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[2] = 0x3B;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[1] = 0x24;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[0] = 0x46;
+
+// ;  idle
+
+// Bytes for Ringing part 1 (03):1B,3C,93,3A,22,12,A3,23
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[7] = 0x1B;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[6] = 0x3C;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[5] = 0x93;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[4] = 0x3A;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[3] = 0x22;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[2] = 0x12;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[1] = 0xA3;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[0] = 0x23;
+
+// Bytes for Ringing part 2 (06):12,A2,A6,BA,22,7A,0A,D5
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[7] = 0x12;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[6] = 0xA2;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[5] = 0xA6;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[4] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[3] = 0x22;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[2] = 0x7A;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[1] = 0x0A;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[0] = 0xD5;
+
+// Levelmetering Ringing           (0D):32,45,B5,84   ; 50Hz 20V
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[3] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[2] = 0x45;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[1] = 0xB5;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[0] = 0x84;
+
+// Caller ID 1st Tone              (0E):CA,0E,CA,09,99,99,99,99
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[7] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[6] = 0x0E;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[5] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[4] = 0x09;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[3] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[2] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[1] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[0] = 0x99;
+
+// Caller ID 2nd Tone              (0F):FD,B5,BA,07,DA,00,00,00
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[7] = 0xFD;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[6] = 0xB5;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[5] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[4] = 0x07;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[3] = 0xDA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[2] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[1] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[0] = 0x00;
+
+// ;CR Registers
+	// Config. Reg. 0 (filters)        (cr0):FF
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg = 0xFF;
+
+// Config. Reg. 1 (dialing)        (cr1):05
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.reg = 0x05;
+
+// Config. Reg. 2 (caller ID)      (cr2):04
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr2.reg = 0x04;
+
+// Config. Reg. 3 (testloops)      (cr3):00        ; 
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr3.reg = 0x00;
+
+// Config. Reg. 4 (analog gain)    (cr4):01
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg = 0x02;		//0x01;
+
+// Config. Reg. 5 (Version)        (cr5):02
+	// Config. Reg. 6 (Reserved)       (cr6):00
+	// Config. Reg. 7 (Reserved)       (cr7):00
+
+// ;xr Registers
+	// Ext. Reg. 0 (Interrupt Reg.)    (xr0):02
+	j->m_DAAShadowRegs.XOP_xr0_W.reg = 0x02;	// SO_1 set to '1' because it is inverted.
+
+// Ext. Reg. 1 (Interrupt enable)  (xr1):1C
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr1.reg = 0x1C;		// RING, Caller ID, VDD_OK
+
+// Ext. Reg. 2 (Cadence Time Out)  (xr2):7D
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr2.reg = 0x7D;
+
+// Ext. Reg. 3 (DC Char)           (xr3):2B      ; 
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr3.reg = 0x2B;
+
+// Ext. Reg. 4 (Cadence)           (xr4):00
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr4.reg = 0x00;
+
+// Ext. Reg. 5 (Ring timer)        (xr5):22
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr5.reg = 0x22;
+
+// Ext. Reg. 6 (Power State)       (xr6):00
+	j->m_DAAShadowRegs.XOP_xr6_W.reg = 0x00;
+
+// Ext. Reg. 7 (Vdd)               (xr7):40
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr7.reg = 0x40;		// 0x40 ??? Should it be 0x00?
+
+// DTMF Tone 1                     (0B): 11,B3,5A,2C    ;   697 Hz  
+	//                                       12,33,5A,C3    ;  770 Hz  
+	//                                       13,3C,5B,32    ;  852 Hz  
+	//                                       1D,1B,5C,CC    ;  941 Hz  
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[3] = 0x11;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[2] = 0xB3;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[1] = 0x5A;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[0] = 0x2C;
+
+// DTMF Tone 2                     (0C): 32,32,52,B3    ;  1209 Hz  
+	//                                       EC,1D,52,22    ;  1336 Hz  
+	//                                       AA,AC,51,D2    ;  1477 Hz  
+	//                                       9B,3B,51,25    ;  1633 Hz  
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[3] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[2] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[1] = 0x52;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[0] = 0xB3;
+
+}
+
+static void DAA_Coeff_Japan(int board)
+{
+	IXJ *j = &ixj[board];
+
+	int i;
+
+	//-----------------------------------------------
+	// CAO
+	for (i = 0; i < ALISDAA_CALLERID_SIZE; i++) {
+		j->m_DAAShadowRegs.CAO_REGS.CAO.CallerID[i] = 0;
+	}
+
+	// Bytes for IM-filter part 1 (04): 06,BD,E2,2D,BA,F9,A0,00
+	    j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[7] = 0x06;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[6] = 0xBD;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[5] = 0xE2;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[4] = 0x2D;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[3] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[2] = 0xF9;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[1] = 0xA0;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_1[0] = 0x00;
+
+// Bytes for IM-filter part 2 (05): 6F,F7,00,0E,34,33,E0,08
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[7] = 0x6F;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[6] = 0xF7;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[5] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[4] = 0x0E;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[3] = 0x34;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[2] = 0x33;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[1] = 0xE0;
+	j->m_DAAShadowRegs.COP_REGS.COP.IMFilterCoeff_2[0] = 0x08;
+
+// Bytes for FRX-filter       (08): 02,8F,68,77,9C,58,F0,08
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[7] = 0x02;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[6] = 0x8F;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[5] = 0x68;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[4] = 0x77;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[3] = 0x9C;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[2] = 0x58;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[1] = 0xF0;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRXFilterCoeff[0] = 0x08;
+
+// Bytes for FRR-filter       (07): 03,8F,38,73,87,EA,20,08
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[7] = 0x03;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[6] = 0x8F;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[5] = 0x38;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[4] = 0x73;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[3] = 0x87;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[2] = 0xEA;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[1] = 0x20;
+	j->m_DAAShadowRegs.COP_REGS.COP.FRRFilterCoeff[0] = 0x08;
+
+// Bytes for AX-filter        (0A): 51,C5,DD,CA
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[3] = 0x51;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[2] = 0xC5;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[1] = 0xDD;
+	j->m_DAAShadowRegs.COP_REGS.COP.AXFilterCoeff[0] = 0xCA;
+
+// Bytes for AR-filter        (09): 25,A7,10,D6
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[3] = 0x25;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[2] = 0xA7;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[1] = 0x10;
+	j->m_DAAShadowRegs.COP_REGS.COP.ARFilterCoeff[0] = 0xD6;
+
+// Bytes for TH-filter part 1 (00): 00,42,48,81,AE,80,00,98
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[7] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[6] = 0x42;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[5] = 0x48;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[4] = 0x81;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[3] = 0xAE;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[2] = 0x80;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[1] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_1[0] = 0x98;
+
+// Bytes for TH-filter part 2 (01): 02,AB,2A,20,99,5B,89,28
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[7] = 0x02;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[6] = 0xAB;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[5] = 0x2A;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[4] = 0x20;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[3] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[2] = 0x5B;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[1] = 0x89;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_2[0] = 0x28;
+
+// Bytes for TH-filter part 3 (02): 00,88,DA,25,34,C5,4C,BA
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[7] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[6] = 0x88;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[5] = 0xDA;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[4] = 0x25;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[3] = 0x34;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[2] = 0xC5;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[1] = 0x4C;
+	j->m_DAAShadowRegs.COP_REGS.COP.THFilterCoeff_3[0] = 0xBA;
+
+// ;  idle
+
+// Bytes for Ringing part 1 (03):1B,3C,93,3A,22,12,A3,23
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[7] = 0x1B;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[6] = 0x3C;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[5] = 0x93;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[4] = 0x3A;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[3] = 0x22;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[2] = 0x12;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[1] = 0xA3;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_1[0] = 0x23;
+
+// Bytes for Ringing part 2 (06):12,A2,A6,BA,22,7A,0A,D5
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[7] = 0x12;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[6] = 0xA2;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[5] = 0xA6;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[4] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[3] = 0x22;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[2] = 0x7A;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[1] = 0x0A;
+	j->m_DAAShadowRegs.COP_REGS.COP.RingerImpendance_2[0] = 0xD5;
+
+// Levelmetering Ringing           (0D):AA,35,0F,8E    ; 25Hz 30V ?????????
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[3] = 0xAA;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[2] = 0x35;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[1] = 0x0F;
+	j->m_DAAShadowRegs.COP_REGS.COP.LevelmeteringRinging[0] = 0x8E;
+
+// Caller ID 1st Tone              (0E):CA,0E,CA,09,99,99,99,99
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[7] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[6] = 0x0E;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[5] = 0xCA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[4] = 0x09;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[3] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[2] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[1] = 0x99;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID1stTone[0] = 0x99;
+
+// Caller ID 2nd Tone              (0F):FD,B5,BA,07,DA,00,00,00
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[7] = 0xFD;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[6] = 0xB5;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[5] = 0xBA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[4] = 0x07;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[3] = 0xDA;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[2] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[1] = 0x00;
+	j->m_DAAShadowRegs.COP_REGS.COP.CallerID2ndTone[0] = 0x00;
+
+// ;CR Registers
+	// Config. Reg. 0 (filters)        (cr0):FF
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr0.reg = 0xFF;
+
+// Config. Reg. 1 (dialing)        (cr1):05
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr1.reg = 0x05;
+
+// Config. Reg. 2 (caller ID)      (cr2):04
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr2.reg = 0x04;
+
+// Config. Reg. 3 (testloops)      (cr3):00        ; 
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr3.reg = 0x00;
+
+// Config. Reg. 4 (analog gain)    (cr4):01
+	j->m_DAAShadowRegs.SOP_REGS.SOP.cr4.reg = 0x02;		//0x01;
+
+// Config. Reg. 5 (Version)        (cr5):02
+	// Config. Reg. 6 (Reserved)       (cr6):00
+	// Config. Reg. 7 (Reserved)       (cr7):00
+
+// ;xr Registers
+	// Ext. Reg. 0 (Interrupt Reg.)    (xr0):02
+	j->m_DAAShadowRegs.XOP_xr0_W.reg = 0x02;	// SO_1 set to '1' because it is inverted.
+
+// Ext. Reg. 1 (Interrupt enable)  (xr1):1C
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr1.reg = 0x1C;		// RING, Caller ID, VDD_OK
+
+// Ext. Reg. 2 (Cadence Time Out)  (xr2):7D
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr2.reg = 0x7D;
+
+// Ext. Reg. 3 (DC Char)           (xr3):22        ; 
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr3.reg = 0x22;
+
+// Ext. Reg. 4 (Cadence)           (xr4):00
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr4.reg = 0x00;
+
+// Ext. Reg. 5 (Ring timer)        (xr5):22
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr5.reg = 0x22;
+
+// Ext. Reg. 6 (Power State)       (xr6):00
+	j->m_DAAShadowRegs.XOP_xr6_W.reg = 0x00;
+
+// Ext. Reg. 7 (Vdd)               (xr7):40
+	j->m_DAAShadowRegs.XOP_REGS.XOP.xr7.reg = 0x40;		// 0x40 ??? Should it be 0x00?
+
+// DTMF Tone 1                     (0B): 11,B3,5A,2C    ;   697 Hz  
+	//                                       12,33,5A,C3    ;  770 Hz  
+	//                                       13,3C,5B,32    ;  852 Hz  
+	//                                       1D,1B,5C,CC    ;  941 Hz  
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[3] = 0x11;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[2] = 0xB3;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[1] = 0x5A;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone1Coeff[0] = 0x2C;
+
+// DTMF Tone 2                     (0C): 32,32,52,B3    ;  1209 Hz  
+	//                                       EC,1D,52,22    ;  1336 Hz  
+	//                                       AA,AC,51,D2    ;  1477 Hz  
+	//                                       9B,3B,51,25    ;  1633 Hz  
+
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[3] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[2] = 0x32;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[1] = 0x52;
+	j->m_DAAShadowRegs.COP_REGS.COP.Tone2Coeff[0] = 0xB3;
+
+}
+
+static s16 tone_table[][19] =
+{
+	{			// f20_50[]
+		32538,		// A1 = 1.985962
+		 -32325,	// A2 = -0.986511
+		 -343,		// B2 = -0.010493
+		 0,		// B1 = 0
+		 343,		// B0 = 0.010493
+		 32619,		// A1 = 1.990906
+		 -32520,	// A2 = -0.992462
+		 19179,		// B2 = 0.585327
+		 -19178,	// B1 = -1.170593
+		 19179,		// B0 = 0.585327
+		 32723,		// A1 = 1.997314
+		 -32686,	// A2 = -0.997528
+		 9973,		// B2 = 0.304352
+		 -9955,		// B1 = -0.607605
+		 9973,		// B0 = 0.304352
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f133_200[]
+		32072,		// A1 = 1.95752
+		 -31896,	// A2 = -0.973419
+		 -435,		// B2 = -0.013294
+		 0,		// B1 = 0
+		 435,		// B0 = 0.013294
+		 32188,		// A1 = 1.9646
+		 -32400,	// A2 = -0.98877
+		 15139,		// B2 = 0.462036
+		 -14882,	// B1 = -0.908356
+		 15139,		// B0 = 0.462036
+		 32473,		// A1 = 1.981995
+		 -32524,	// A2 = -0.992584
+		 23200,		// B2 = 0.708008
+		 -23113,	// B1 = -1.410706
+		 23200,		// B0 = 0.708008
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 300.txt
+		31769,		// A1 = -1.939026
+		 -32584,	// A2 = 0.994385
+		 -475,		// B2 = -0.014522
+		 0,		// B1 = 0.000000
+		 475,		// B0 = 0.014522
+		 31789,		// A1 = -1.940247
+		 -32679,	// A2 = 0.997284
+		 17280,		// B2 = 0.527344
+		 -16865,	// B1 = -1.029358
+		 17280,		// B0 = 0.527344
+		 31841,		// A1 = -1.943481
+		 -32681,	// A2 = 0.997345
+		 543,		// B2 = 0.016579
+		 -525,		// B1 = -0.032097
+		 543,		// B0 = 0.016579
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f300_420[]
+		30750,		// A1 = 1.876892
+		 -31212,	// A2 = -0.952515
+		 -804,		// B2 = -0.024541
+		 0,		// B1 = 0
+		 804,		// B0 = 0.024541
+		 30686,		// A1 = 1.872925
+		 -32145,	// A2 = -0.980988
+		 14747,		// B2 = 0.450043
+		 -13703,	// B1 = -0.836395
+		 14747,		// B0 = 0.450043
+		 31651,		// A1 = 1.931824
+		 -32321,	// A2 = -0.986389
+		 24425,		// B2 = 0.745422
+		 -23914,	// B1 = -1.459595
+		 24427,		// B0 = 0.745483
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 330.txt
+		31613,		// A1 = -1.929565
+		 -32646,	// A2 = 0.996277
+		 -185,		// B2 = -0.005657
+		 0,		// B1 = 0.000000
+		 185,		// B0 = 0.005657
+		 31620,		// A1 = -1.929932
+		 -32713,	// A2 = 0.998352
+		 19253,		// B2 = 0.587585
+		 -18566,	// B1 = -1.133179
+		 19253,		// B0 = 0.587585
+		 31674,		// A1 = -1.933228
+		 -32715,	// A2 = 0.998413
+		 2575,		// B2 = 0.078590
+		 -2495,		// B1 = -0.152283
+		 2575,		// B0 = 0.078590
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f300_425[]
+		30741,		// A1 = 1.876282
+		 -31475,	// A2 = -0.960541
+		 -703,		// B2 = -0.021484
+		 0,		// B1 = 0
+		 703,		// B0 = 0.021484
+		 30688,		// A1 = 1.873047
+		 -32248,	// A2 = -0.984161
+		 14542,		// B2 = 0.443787
+		 -13523,	// B1 = -0.825439
+		 14542,		// B0 = 0.443817
+		 31494,		// A1 = 1.922302
+		 -32366,	// A2 = -0.987762
+		 21577,		// B2 = 0.658508
+		 -21013,	// B1 = -1.282532
+		 21577,		// B0 = 0.658508
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f330_440[]
+		30627,		// A1 = 1.869324
+		 -31338,	// A2 = -0.95636
+		 -843,		// B2 = -0.025749
+		 0,		// B1 = 0
+		 843,		// B0 = 0.025749
+		 30550,		// A1 = 1.864685
+		 -32221,	// A2 = -0.983337
+		 13594,		// B2 = 0.414886
+		 -12589,	// B1 = -0.768402
+		 13594,		// B0 = 0.414886
+		 31488,		// A1 = 1.921936
+		 -32358,	// A2 = -0.987518
+		 24684,		// B2 = 0.753296
+		 -24029,	// B1 = -1.466614
+		 24684,		// B0 = 0.753296
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 340.txt
+		31546,		// A1 = -1.925476
+		 -32646,	// A2 = 0.996277
+		 -445,		// B2 = -0.013588
+		 0,		// B1 = 0.000000
+		 445,		// B0 = 0.013588
+		 31551,		// A1 = -1.925781
+		 -32713,	// A2 = 0.998352
+		 23884,		// B2 = 0.728882
+		 -22979,	// B1 = -1.402527
+		 23884,		// B0 = 0.728882
+		 31606,		// A1 = -1.929138
+		 -32715,	// A2 = 0.998413
+		 863,		// B2 = 0.026367
+		 -835,		// B1 = -0.050985
+		 863,		// B0 = 0.026367
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f350_400[]
+		31006,		// A1 = 1.892517
+		 -32029,	// A2 = -0.977448
+		 -461,		// B2 = -0.014096
+		 0,		// B1 = 0
+		 461,		// B0 = 0.014096
+		 30999,		// A1 = 1.892029
+		 -32487,	// A2 = -0.991455
+		 11325,		// B2 = 0.345612
+		 -10682,	// B1 = -0.651978
+		 11325,		// B0 = 0.345612
+		 31441,		// A1 = 1.919067
+		 -32526,	// A2 = -0.992615
+		 24324,		// B2 = 0.74231
+		 -23535,	// B1 = -1.436523
+		 24324,		// B0 = 0.74231
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f350_440[]
+		30634,		// A1 = 1.869751
+		 -31533,	// A2 = -0.962341
+		 -680,		// B2 = -0.020782
+		 0,		// B1 = 0
+		 680,		// B0 = 0.020782
+		 30571,		// A1 = 1.865906
+		 -32277,	// A2 = -0.985016
+		 12894,		// B2 = 0.393524
+		 -11945,	// B1 = -0.729065
+		 12894,		// B0 = 0.393524
+		 31367,		// A1 = 1.91449
+		 -32379,	// A2 = -0.988129
+		 23820,		// B2 = 0.726929
+		 -23104,	// B1 = -1.410217
+		 23820,		// B0 = 0.726929
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f350_450[]
+		30552,		// A1 = 1.864807
+		 -31434,	// A2 = -0.95929
+		 -690,		// B2 = -0.021066
+		 0,		// B1 = 0
+		 690,		// B0 = 0.021066
+		 30472,		// A1 = 1.859924
+		 -32248,	// A2 = -0.984161
+		 13385,		// B2 = 0.408478
+		 -12357,	// B1 = -0.754242
+		 13385,		// B0 = 0.408478
+		 31358,		// A1 = 1.914001
+		 -32366,	// A2 = -0.987732
+		 26488,		// B2 = 0.80835
+		 -25692,	// B1 = -1.568176
+		 26490,		// B0 = 0.808411
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 360.txt
+		31397,		// A1 = -1.916321
+		 -32623,	// A2 = 0.995605
+		 -117,		// B2 = -0.003598
+		 0,		// B1 = 0.000000
+		 117,		// B0 = 0.003598
+		 31403,		// A1 = -1.916687
+		 -32700,	// A2 = 0.997925
+		 3388,		// B2 = 0.103401
+		 -3240,		// B1 = -0.197784
+		 3388,		// B0 = 0.103401
+		 31463,		// A1 = -1.920410
+		 -32702,	// A2 = 0.997986
+		 13346,		// B2 = 0.407288
+		 -12863,	// B1 = -0.785126
+		 13346,		// B0 = 0.407288
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f380_420[]
+		30831,		// A1 = 1.881775
+		 -32064,	// A2 = -0.978546
+		 -367,		// B2 = -0.01122
+		 0,		// B1 = 0
+		 367,		// B0 = 0.01122
+		 30813,		// A1 = 1.880737
+		 -32456,	// A2 = -0.990509
+		 11068,		// B2 = 0.337769
+		 -10338,	// B1 = -0.631042
+		 11068,		// B0 = 0.337769
+		 31214,		// A1 = 1.905212
+		 -32491,	// A2 = -0.991577
+		 16374,		// B2 = 0.499695
+		 -15781,	// B1 = -0.963196
+		 16374,		// B0 = 0.499695
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 392.txt
+		31152,		// A1 = -1.901428
+		 -32613,	// A2 = 0.995300
+		 -314,		// B2 = -0.009605
+		 0,		// B1 = 0.000000
+		 314,		// B0 = 0.009605
+		 31156,		// A1 = -1.901672
+		 -32694,	// A2 = 0.997742
+		 28847,		// B2 = 0.880371
+		 -2734,		// B1 = -0.166901
+		 28847,		// B0 = 0.880371
+		 31225,		// A1 = -1.905823
+		 -32696,	// A2 = 0.997803
+		 462,		// B2 = 0.014108
+		 -442,		// B1 = -0.027019
+		 462,		// B0 = 0.014108
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f400_425[]
+		30836,		// A1 = 1.882141
+		 -32296,	// A2 = -0.985596
+		 -324,		// B2 = -0.009903
+		 0,		// B1 = 0
+		 324,		// B0 = 0.009903
+		 30825,		// A1 = 1.881409
+		 -32570,	// A2 = -0.993958
+		 16847,		// B2 = 0.51416
+		 -15792,	// B1 = -0.963898
+		 16847,		// B0 = 0.51416
+		 31106,		// A1 = 1.89856
+		 -32584,	// A2 = -0.994415
+		 9579,		// B2 = 0.292328
+		 -9164,		// B1 = -0.559357
+		 9579,		// B0 = 0.292328
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f400_440[]
+		30702,		// A1 = 1.873962
+		 -32134,	// A2 = -0.980682
+		 -517,		// B2 = -0.015793
+		 0,		// B1 = 0
+		 517,		// B0 = 0.015793
+		 30676,		// A1 = 1.872375
+		 -32520,	// A2 = -0.992462
+		 8144,		// B2 = 0.24855
+		 -7596,		// B1 = -0.463684
+		 8144,		// B0 = 0.24855
+		 31084,		// A1 = 1.897217
+		 -32547,	// A2 = -0.993256
+		 22713,		// B2 = 0.693176
+		 -21734,	// B1 = -1.326599
+		 22713,		// B0 = 0.693176
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f400_450[]
+		30613,		// A1 = 1.86853
+		 -32031,	// A2 = -0.977509
+		 -618,		// B2 = -0.018866
+		 0,		// B1 = 0
+		 618,		// B0 = 0.018866
+		 30577,		// A1 = 1.866272
+		 -32491,	// A2 = -0.991577
+		 9612,		// B2 = 0.293335
+		 -8935,		// B1 = -0.54541
+		 9612,		// B0 = 0.293335
+		 31071,		// A1 = 1.896484
+		 -32524,	// A2 = -0.992584
+		 21596,		// B2 = 0.659058
+		 -20667,	// B1 = -1.261414
+		 21596,		// B0 = 0.659058
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 420.txt
+		30914,		// A1 = -1.886841
+		 -32584,	// A2 = 0.994385
+		 -426,		// B2 = -0.013020
+		 0,		// B1 = 0.000000
+		 426,		// B0 = 0.013020
+		 30914,		// A1 = -1.886841
+		 -32679,	// A2 = 0.997314
+		 17520,		// B2 = 0.534668
+		 -16471,	// B1 = -1.005310
+		 17520,		// B0 = 0.534668
+		 31004,		// A1 = -1.892334
+		 -32683,	// A2 = 0.997406
+		 819,		// B2 = 0.025023
+		 -780,		// B1 = -0.047619
+		 819,		// B0 = 0.025023
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 425.txt
+		30881,		// A1 = -1.884827
+		 -32603,	// A2 = 0.994965
+		 -496,		// B2 = -0.015144
+		 0,		// B1 = 0.000000
+		 496,		// B0 = 0.015144
+		 30880,		// A1 = -1.884766
+		 -32692,	// A2 = 0.997711
+		 24767,		// B2 = 0.755859
+		 -23290,	// B1 = -1.421509
+		 24767,		// B0 = 0.755859
+		 30967,		// A1 = -1.890076
+		 -32694,	// A2 = 0.997772
+		 728,		// B2 = 0.022232
+		 -691,		// B1 = -0.042194
+		 728,		// B0 = 0.022232
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f425_450[]
+		30646,		// A1 = 1.870544
+		 -32327,	// A2 = -0.986572
+		 -287,		// B2 = -0.008769
+		 0,		// B1 = 0
+		 287,		// B0 = 0.008769
+		 30627,		// A1 = 1.869324
+		 -32607,	// A2 = -0.995087
+		 13269,		// B2 = 0.404968
+		 -12376,	// B1 = -0.755432
+		 13269,		// B0 = 0.404968
+		 30924,		// A1 = 1.887512
+		 -32619,	// A2 = -0.995453
+		 19950,		// B2 = 0.608826
+		 -18940,	// B1 = -1.156006
+		 19950,		// B0 = 0.608826
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f425_475[]
+		30396,		// A1 = 1.855225
+		 -32014,	// A2 = -0.97699
+		 -395,		// B2 = -0.012055
+		 0,		// B1 = 0
+		 395,		// B0 = 0.012055
+		 30343,		// A1 = 1.85199
+		 -32482,	// A2 = -0.991302
+		 17823,		// B2 = 0.543945
+		 -16431,	// B1 = -1.002869
+		 17823,		// B0 = 0.543945
+		 30872,		// A1 = 1.884338
+		 -32516,	// A2 = -0.99231
+		 18124,		// B2 = 0.553101
+		 -17246,	// B1 = -1.052673
+		 18124,		// B0 = 0.553101
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 435.txt
+		30796,		// A1 = -1.879639
+		 -32603,	// A2 = 0.994965
+		 -254,		// B2 = -0.007762
+		 0,		// B1 = 0.000000
+		 254,		// B0 = 0.007762
+		 30793,		// A1 = -1.879456
+		 -32692,	// A2 = 0.997711
+		 18934,		// B2 = 0.577820
+		 -17751,	// B1 = -1.083496
+		 18934,		// B0 = 0.577820
+		 30882,		// A1 = -1.884888
+		 -32694,	// A2 = 0.997772
+		 1858,		// B2 = 0.056713
+		 -1758,		// B1 = -0.107357
+		 1858,		// B0 = 0.056713
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f440_450[]
+		30641,		// A1 = 1.870239
+		 -32458,	// A2 = -0.99057
+		 -155,		// B2 = -0.004735
+		 0,		// B1 = 0
+		 155,		// B0 = 0.004735
+		 30631,		// A1 = 1.869568
+		 -32630,	// A2 = -0.995789
+		 11453,		// B2 = 0.349548
+		 -10666,	// B1 = -0.651001
+		 11453,		// B0 = 0.349548
+		 30810,		// A1 = 1.880554
+		 -32634,	// A2 = -0.995941
+		 12237,		// B2 = 0.373474
+		 -11588,	// B1 = -0.707336
+		 12237,		// B0 = 0.373474
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f440_480[]
+		30367,		// A1 = 1.853455
+		 -32147,	// A2 = -0.981079
+		 -495,		// B2 = -0.015113
+		 0,		// B1 = 0
+		 495,		// B0 = 0.015113
+		 30322,		// A1 = 1.850769
+		 -32543,	// A2 = -0.993134
+		 10031,		// B2 = 0.306152
+		 -9252,		// B1 = -0.564728
+		 10031,		// B0 = 0.306152
+		 30770,		// A1 = 1.878052
+		 -32563,	// A2 = -0.993774
+		 22674,		// B2 = 0.691956
+		 -21465,	// B1 = -1.31012
+		 22674,		// B0 = 0.691956
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 445.txt
+		30709,		// A1 = -1.874329
+		 -32603,	// A2 = 0.994965
+		 -83,		// B2 = -0.002545
+		 0,		// B1 = 0.000000
+		 83,		// B0 = 0.002545
+		 30704,		// A1 = -1.874084
+		 -32692,	// A2 = 0.997711
+		 10641,		// B2 = 0.324738
+		 -9947,		// B1 = -0.607147
+		 10641,		// B0 = 0.324738
+		 30796,		// A1 = -1.879639
+		 -32694,	// A2 = 0.997772
+		 10079,		// B2 = 0.307587
+		 9513,		// B1 = 0.580688
+		 10079,		// B0 = 0.307587
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 450.txt
+		30664,		// A1 = -1.871643
+		 -32603,	// A2 = 0.994965
+		 -164,		// B2 = -0.005029
+		 0,		// B1 = 0.000000
+		 164,		// B0 = 0.005029
+		 30661,		// A1 = -1.871399
+		 -32692,	// A2 = 0.997711
+		 15294,		// B2 = 0.466736
+		 -14275,	// B1 = -0.871307
+		 15294,		// B0 = 0.466736
+		 30751,		// A1 = -1.876953
+		 -32694,	// A2 = 0.997772
+		 3548,		// B2 = 0.108284
+		 -3344,		// B1 = -0.204155
+		 3548,		// B0 = 0.108284
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 452.txt
+		30653,		// A1 = -1.870911
+		 -32615,	// A2 = 0.995361
+		 -209,		// B2 = -0.006382
+		 0,		// B1 = 0.000000
+		 209,		// B0 = 0.006382
+		 30647,		// A1 = -1.870605
+		 -32702,	// A2 = 0.997986
+		 18971,		// B2 = 0.578979
+		 -17716,	// B1 = -1.081299
+		 18971,		// B0 = 0.578979
+		 30738,		// A1 = -1.876099
+		 -32702,	// A2 = 0.998016
+		 2967,		// B2 = 0.090561
+		 -2793,		// B1 = -0.170502
+		 2967,		// B0 = 0.090561
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 475.txt
+		30437,		// A1 = -1.857727
+		 -32603,	// A2 = 0.994965
+		 -264,		// B2 = -0.008062
+		 0,		// B1 = 0.000000
+		 264,		// B0 = 0.008062
+		 30430,		// A1 = -1.857300
+		 -32692,	// A2 = 0.997711
+		 21681,		// B2 = 0.661682
+		 -20082,	// B1 = -1.225708
+		 21681,		// B0 = 0.661682
+		 30526,		// A1 = -1.863220
+		 -32694,	// A2 = 0.997742
+		 1559,		// B2 = 0.047600
+		 -1459,		// B1 = -0.089096
+		 1559,		// B0 = 0.047600
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f480_620[]
+		28975,		// A1 = 1.768494
+		 -30955,	// A2 = -0.944672
+		 -1026,		// B2 = -0.03133
+		 0,		// B1 = 0
+		 1026,		// B0 = 0.03133
+		 28613,		// A1 = 1.746399
+		 -32089,	// A2 = -0.979309
+		 14214,		// B2 = 0.433807
+		 -12202,	// B1 = -0.744812
+		 14214,		// B0 = 0.433807
+		 30243,		// A1 = 1.845947
+		 -32238,	// A2 = -0.983856
+		 24825,		// B2 = 0.757629
+		 -23402,	// B1 = -1.428345
+		 24825,		// B0 = 0.757629
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 494.txt
+		30257,		// A1 = -1.846741
+		 -32605,	// A2 = 0.995056
+		 -249,		// B2 = -0.007625
+		 0,		// B1 = 0.000000
+		 249,		// B0 = 0.007625
+		 30247,		// A1 = -1.846191
+		 -32694,	// A2 = 0.997772
+		 18088,		// B2 = 0.552002
+		 -16652,	// B1 = -1.016418
+		 18088,		// B0 = 0.552002
+		 30348,		// A1 = -1.852295
+		 -32696,	// A2 = 0.997803
+		 2099,		// B2 = 0.064064
+		 -1953,		// B1 = -0.119202
+		 2099,		// B0 = 0.064064
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 500.txt
+		30202,		// A1 = -1.843431
+		 -32624,	// A2 = 0.995622
+		 -413,		// B2 = -0.012622
+		 0,		// B1 = 0.000000
+		 413,		// B0 = 0.012622
+		 30191,		// A1 = -1.842721
+		 -32714,	// A2 = 0.998364
+		 25954,		// B2 = 0.792057
+		 -23890,	// B1 = -1.458131
+		 25954,		// B0 = 0.792057
+		 30296,		// A1 = -1.849172
+		 -32715,	// A2 = 0.998397
+		 2007,		// B2 = 0.061264
+		 -1860,		// B1 = -0.113568
+		 2007,		// B0 = 0.061264
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 520.txt
+		30001,		// A1 = -1.831116
+		 -32613,	// A2 = 0.995270
+		 -155,		// B2 = -0.004750
+		 0,		// B1 = 0.000000
+		 155,		// B0 = 0.004750
+		 29985,		// A1 = -1.830200
+		 -32710,	// A2 = 0.998260
+		 6584,		// B2 = 0.200928
+		 -6018,		// B1 = -0.367355
+		 6584,		// B0 = 0.200928
+		 30105,		// A1 = -1.837524
+		 -32712,	// A2 = 0.998291
+		 23812,		// B2 = 0.726685
+		 -21936,	// B1 = -1.338928
+		 23812,		// B0 = 0.726685
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 523.txt
+		29964,		// A1 = -1.828918
+		 -32601,	// A2 = 0.994904
+		 -101,		// B2 = -0.003110
+		 0,		// B1 = 0.000000
+		 101,		// B0 = 0.003110
+		 29949,		// A1 = -1.827942
+		 -32700,	// A2 = 0.997925
+		 11041,		// B2 = 0.336975
+		 -10075,	// B1 = -0.614960
+		 11041,		// B0 = 0.336975
+		 30070,		// A1 = -1.835388
+		 -32702,	// A2 = 0.997986
+		 16762,		// B2 = 0.511536
+		 -15437,	// B1 = -0.942230
+		 16762,		// B0 = 0.511536
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 525.txt
+		29936,		// A1 = -1.827209
+		 -32584,	// A2 = 0.994415
+		 -91,		// B2 = -0.002806
+		 0,		// B1 = 0.000000
+		 91,		// B0 = 0.002806
+		 29921,		// A1 = -1.826233
+		 -32688,	// A2 = 0.997559
+		 11449,		// B2 = 0.349396
+		 -10426,	// B1 = -0.636383
+		 11449,		// B0 = 0.349396
+		 30045,		// A1 = -1.833862
+		 -32688,	// A2 = 0.997589
+		 13055,		// B2 = 0.398407
+		 -12028,	// B1 = -0.734161
+		 13055,		// B0 = 0.398407
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f540_660[]
+		28499,		// A1 = 1.739441
+		 -31129,	// A2 = -0.949982
+		 -849,		// B2 = -0.025922
+		 0,		// B1 = 0
+		 849,		// B0 = 0.025922
+		 28128,		// A1 = 1.716797
+		 -32130,	// A2 = -0.98056
+		 14556,		// B2 = 0.444214
+		 -12251,	// B1 = -0.747772
+		 14556,		// B0 = 0.444244
+		 29667,		// A1 = 1.81073
+		 -32244,	// A2 = -0.984039
+		 23038,		// B2 = 0.703064
+		 -21358,	// B1 = -1.303589
+		 23040,		// B0 = 0.703125
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 587.txt
+		29271,		// A1 = -1.786560
+		 -32599,	// A2 = 0.994873
+		 -490,		// B2 = -0.014957
+		 0,		// B1 = 0.000000
+		 490,		// B0 = 0.014957
+		 29246,		// A1 = -1.785095
+		 -32700,	// A2 = 0.997925
+		 28961,		// B2 = 0.883850
+		 -25796,	// B1 = -1.574463
+		 28961,		// B0 = 0.883850
+		 29383,		// A1 = -1.793396
+		 -32700,	// A2 = 0.997955
+		 1299,		// B2 = 0.039650
+		 -1169,		// B1 = -0.071396
+		 1299,		// B0 = 0.039650
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 590.txt
+		29230,		// A1 = -1.784058
+		 -32584,	// A2 = 0.994415
+		 -418,		// B2 = -0.012757
+		 0,		// B1 = 0.000000
+		 418,		// B0 = 0.012757
+		 29206,		// A1 = -1.782593
+		 -32688,	// A2 = 0.997559
+		 36556,		// B2 = 1.115601
+		 -32478,	// B1 = -1.982300
+		 36556,		// B0 = 1.115601
+		 29345,		// A1 = -1.791077
+		 -32688,	// A2 = 0.997589
+		 897,		// B2 = 0.027397
+		 -808,		// B1 = -0.049334
+		 897,		// B0 = 0.027397
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 600.txt
+		29116,		// A1 = -1.777100
+		 -32603,	// A2 = 0.994965
+		 -165,		// B2 = -0.005039
+		 0,		// B1 = 0.000000
+		 165,		// B0 = 0.005039
+		 29089,		// A1 = -1.775452
+		 -32708,	// A2 = 0.998199
+		 6963,		// B2 = 0.212494
+		 -6172,		// B1 = -0.376770
+		 6963,		// B0 = 0.212494
+		 29237,		// A1 = -1.784485
+		 -32710,	// A2 = 0.998230
+		 24197,		// B2 = 0.738464
+		 -21657,	// B1 = -1.321899
+		 24197,		// B0 = 0.738464
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 660.txt
+		28376,		// A1 = -1.731934
+		 -32567,	// A2 = 0.993896
+		 -363,		// B2 = -0.011102
+		 0,		// B1 = 0.000000
+		 363,		// B0 = 0.011102
+		 28337,		// A1 = -1.729614
+		 -32683,	// A2 = 0.997434
+		 21766,		// B2 = 0.664246
+		 -18761,	// B1 = -1.145081
+		 21766,		// B0 = 0.664246
+		 28513,		// A1 = -1.740356
+		 -32686,	// A2 = 0.997498
+		 2509,		// B2 = 0.076584
+		 -2196,		// B1 = -0.134041
+		 2509,		// B0 = 0.076584
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 700.txt
+		27844,		// A1 = -1.699463
+		 -32563,	// A2 = 0.993744
+		 -366,		// B2 = -0.011187
+		 0,		// B1 = 0.000000
+		 366,		// B0 = 0.011187
+		 27797,		// A1 = -1.696655
+		 -32686,	// A2 = 0.997498
+		 22748,		// B2 = 0.694214
+		 -19235,	// B1 = -1.174072
+		 22748,		// B0 = 0.694214
+		 27995,		// A1 = -1.708740
+		 -32688,	// A2 = 0.997559
+		 2964,		// B2 = 0.090477
+		 -2546,		// B1 = -0.155449
+		 2964,		// B0 = 0.090477
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 740.txt
+		27297,		// A1 = -1.666077
+		 -32551,	// A2 = 0.993408
+		 -345,		// B2 = -0.010540
+		 0,		// B1 = 0.000000
+		 345,		// B0 = 0.010540
+		 27240,		// A1 = -1.662598
+		 -32683,	// A2 = 0.997406
+		 22560,		// B2 = 0.688477
+		 -18688,	// B1 = -1.140625
+		 22560,		// B0 = 0.688477
+		 27461,		// A1 = -1.676147
+		 -32684,	// A2 = 0.997467
+		 3541,		// B2 = 0.108086
+		 -2985,		// B1 = -0.182220
+		 3541,		// B0 = 0.108086
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 750.txt
+		27155,		// A1 = -1.657410
+		 -32551,	// A2 = 0.993408
+		 -462,		// B2 = -0.014117
+		 0,		// B1 = 0.000000
+		 462,		// B0 = 0.014117
+		 27097,		// A1 = -1.653870
+		 -32683,	// A2 = 0.997406
+		 32495,		// B2 = 0.991699
+		 -26776,	// B1 = -1.634338
+		 32495,		// B0 = 0.991699
+		 27321,		// A1 = -1.667542
+		 -32684,	// A2 = 0.997467
+		 1835,		// B2 = 0.056007
+		 -1539,		// B1 = -0.093948
+		 1835,		// B0 = 0.056007
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f750_1450[]
+		19298,		// A1 = 1.177917
+		 -24471,	// A2 = -0.746796
+		 -4152,		// B2 = -0.126709
+		 0,		// B1 = 0
+		 4152,		// B0 = 0.126709
+		 12902,		// A1 = 0.787476
+		 -29091,	// A2 = -0.887817
+		 12491,		// B2 = 0.38121
+		 -1794,		// B1 = -0.109528
+		 12494,		// B0 = 0.381317
+		 26291,		// A1 = 1.604736
+		 -30470,	// A2 = -0.929901
+		 28859,		// B2 = 0.880737
+		 -26084,	// B1 = -1.592102
+		 28861,		// B0 = 0.880798
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 770.txt
+		26867,		// A1 = -1.639832
+		 -32551,	// A2 = 0.993408
+		 -123,		// B2 = -0.003755
+		 0,		// B1 = 0.000000
+		 123,		// B0 = 0.003755
+		 26805,		// A1 = -1.636108
+		 -32683,	// A2 = 0.997406
+		 17297,		// B2 = 0.527863
+		 -14096,	// B1 = -0.860382
+		 17297,		// B0 = 0.527863
+		 27034,		// A1 = -1.650085
+		 -32684,	// A2 = 0.997467
+		 12958,		// B2 = 0.395477
+		 -10756,	// B1 = -0.656525
+		 12958,		// B0 = 0.395477
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 800.txt
+		26413,		// A1 = -1.612122
+		 -32547,	// A2 = 0.993286
+		 -223,		// B2 = -0.006825
+		 0,		// B1 = 0.000000
+		 223,		// B0 = 0.006825
+		 26342,		// A1 = -1.607849
+		 -32686,	// A2 = 0.997498
+		 6391,		// B2 = 0.195053
+		 -5120,		// B1 = -0.312531
+		 6391,		// B0 = 0.195053
+		 26593,		// A1 = -1.623108
+		 -32688,	// A2 = 0.997559
+		 23681,		// B2 = 0.722717
+		 -19328,	// B1 = -1.179688
+		 23681,		// B0 = 0.722717
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 816.txt
+		26168,		// A1 = -1.597209
+		 -32528,	// A2 = 0.992706
+		 -235,		// B2 = -0.007182
+		 0,		// B1 = 0.000000
+		 235,		// B0 = 0.007182
+		 26092,		// A1 = -1.592590
+		 -32675,	// A2 = 0.997192
+		 20823,		// B2 = 0.635498
+		 -16510,	// B1 = -1.007751
+		 20823,		// B0 = 0.635498
+		 26363,		// A1 = -1.609070
+		 -32677,	// A2 = 0.997253
+		 6739,		// B2 = 0.205688
+		 -5459,		// B1 = -0.333206
+		 6739,		// B0 = 0.205688
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 850.txt
+		25641,		// A1 = -1.565063
+		 -32536,	// A2 = 0.992950
+		 -121,		// B2 = -0.003707
+		 0,		// B1 = 0.000000
+		 121,		// B0 = 0.003707
+		 25560,		// A1 = -1.560059
+		 -32684,	// A2 = 0.997437
+		 18341,		// B2 = 0.559753
+		 -14252,	// B1 = -0.869904
+		 18341,		// B0 = 0.559753
+		 25837,		// A1 = -1.577026
+		 -32684,	// A2 = 0.997467
+		 16679,		// B2 = 0.509003
+		 -13232,	// B1 = -0.807648
+		 16679,		// B0 = 0.509003
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f857_1645[]
+		16415,		// A1 = 1.001953
+		 -23669,	// A2 = -0.722321
+		 -4549,		// B2 = -0.138847
+		 0,		// B1 = 0
+		 4549,		// B0 = 0.138847
+		 8456,		// A1 = 0.516174
+		 -28996,	// A2 = -0.884918
+		 13753,		// B2 = 0.419724
+		 -12,		// B1 = -0.000763
+		 13757,		// B0 = 0.419846
+		 24632,		// A1 = 1.503418
+		 -30271,	// A2 = -0.923828
+		 29070,		// B2 = 0.887146
+		 -25265,	// B1 = -1.542114
+		 29073,		// B0 = 0.887268
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 900.txt
+		24806,		// A1 = -1.514099
+		 -32501,	// A2 = 0.991852
+		 -326,		// B2 = -0.009969
+		 0,		// B1 = 0.000000
+		 326,		// B0 = 0.009969
+		 24709,		// A1 = -1.508118
+		 -32659,	// A2 = 0.996674
+		 20277,		// B2 = 0.618835
+		 -15182,	// B1 = -0.926636
+		 20277,		// B0 = 0.618835
+		 25022,		// A1 = -1.527222
+		 -32661,	// A2 = 0.996735
+		 4320,		// B2 = 0.131836
+		 -3331,		// B1 = -0.203339
+		 4320,		// B0 = 0.131836
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f900_1300[]
+		19776,		// A1 = 1.207092
+		 -27437,	// A2 = -0.837341
+		 -2666,		// B2 = -0.081371
+		 0,		// B1 = 0
+		 2666,		// B0 = 0.081371
+		 16302,		// A1 = 0.995026
+		 -30354,	// A2 = -0.926361
+		 10389,		// B2 = 0.317062
+		 -3327,		// B1 = -0.203064
+		 10389,		// B0 = 0.317062
+		 24299,		// A1 = 1.483154
+		 -30930,	// A2 = -0.943909
+		 25016,		// B2 = 0.763428
+		 -21171,	// B1 = -1.292236
+		 25016,		// B0 = 0.763428
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f935_1215[]
+		20554,		// A1 = 1.254517
+		 -28764,	// A2 = -0.877838
+		 -2048,		// B2 = -0.062515
+		 0,		// B1 = 0
+		 2048,		// B0 = 0.062515
+		 18209,		// A1 = 1.11145
+		 -30951,	// A2 = -0.94458
+		 9390,		// B2 = 0.286575
+		 -3955,		// B1 = -0.241455
+		 9390,		// B0 = 0.286575
+		 23902,		// A1 = 1.458923
+		 -31286,	// A2 = -0.954803
+		 23252,		// B2 = 0.709595
+		 -19132,	// B1 = -1.167725
+		 23252,		// B0 = 0.709595
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f941_1477[]
+		17543,		// A1 = 1.07074
+		 -26220,	// A2 = -0.800201
+		 -3298,		// B2 = -0.100647
+		 0,		// B1 = 0
+		 3298,		// B0 = 0.100647
+		 12423,		// A1 = 0.75827
+		 -30036,	// A2 = -0.916626
+		 12651,		// B2 = 0.386078
+		 -2444,		// B1 = -0.14917
+		 12653,		// B0 = 0.386154
+		 23518,		// A1 = 1.435425
+		 -30745,	// A2 = -0.938293
+		 27282,		// B2 = 0.832581
+		 -22529,	// B1 = -1.375122
+		 27286,		// B0 = 0.832703
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 942.txt
+		24104,		// A1 = -1.471252
+		 -32507,	// A2 = 0.992065
+		 -351,		// B2 = -0.010722
+		 0,		// B1 = 0.000000
+		 351,		// B0 = 0.010722
+		 23996,		// A1 = -1.464600
+		 -32671,	// A2 = 0.997040
+		 22848,		// B2 = 0.697266
+		 -16639,	// B1 = -1.015564
+		 22848,		// B0 = 0.697266
+		 24332,		// A1 = -1.485168
+		 -32673,	// A2 = 0.997101
+		 4906,		// B2 = 0.149727
+		 -3672,		// B1 = -0.224174
+		 4906,		// B0 = 0.149727
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 950.txt
+		23967,		// A1 = -1.462830
+		 -32507,	// A2 = 0.992065
+		 -518,		// B2 = -0.015821
+		 0,		// B1 = 0.000000
+		 518,		// B0 = 0.015821
+		 23856,		// A1 = -1.456055
+		 -32671,	// A2 = 0.997040
+		 26287,		// B2 = 0.802246
+		 -19031,	// B1 = -1.161560
+		 26287,		// B0 = 0.802246
+		 24195,		// A1 = -1.476746
+		 -32673,	// A2 = 0.997101
+		 2890,		// B2 = 0.088196
+		 -2151,		// B1 = -0.131317
+		 2890,		// B0 = 0.088196
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f950_1400[]
+		18294,		// A1 = 1.116638
+		 -26962,	// A2 = -0.822845
+		 -2914,		// B2 = -0.088936
+		 0,		// B1 = 0
+		 2914,		// B0 = 0.088936
+		 14119,		// A1 = 0.861786
+		 -30227,	// A2 = -0.922455
+		 11466,		// B2 = 0.349945
+		 -2833,		// B1 = -0.172943
+		 11466,		// B0 = 0.349945
+		 23431,		// A1 = 1.430115
+		 -30828,	// A2 = -0.940796
+		 25331,		// B2 = 0.773071
+		 -20911,	// B1 = -1.276367
+		 25331,		// B0 = 0.773071
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 975.txt
+		23521,		// A1 = -1.435608
+		 -32489,	// A2 = 0.991516
+		 -193,		// B2 = -0.005915
+		 0,		// B1 = 0.000000
+		 193,		// B0 = 0.005915
+		 23404,		// A1 = -1.428467
+		 -32655,	// A2 = 0.996582
+		 17740,		// B2 = 0.541412
+		 -12567,	// B1 = -0.767029
+		 17740,		// B0 = 0.541412
+		 23753,		// A1 = -1.449829
+		 -32657,	// A2 = 0.996613
+		 9090,		// B2 = 0.277405
+		 -6662,		// B1 = -0.406647
+		 9090,		// B0 = 0.277405
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1000.txt
+		23071,		// A1 = -1.408203
+		 -32489,	// A2 = 0.991516
+		 -293,		// B2 = -0.008965
+		 0,		// B1 = 0.000000
+		 293,		// B0 = 0.008965
+		 22951,		// A1 = -1.400818
+		 -32655,	// A2 = 0.996582
+		 5689,		// B2 = 0.173645
+		 -3951,		// B1 = -0.241150
+		 5689,		// B0 = 0.173645
+		 23307,		// A1 = -1.422607
+		 -32657,	// A2 = 0.996613
+		 18692,		// B2 = 0.570435
+		 -13447,	// B1 = -0.820770
+		 18692,		// B0 = 0.570435
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1020.txt
+		22701,		// A1 = -1.385620
+		 -32474,	// A2 = 0.991058
+		 -292,		// B2 = -0.008933
+		 0,		//163840      , // B1 = 10.000000
+		 292,		// B0 = 0.008933
+		 22564,		// A1 = -1.377258
+		 -32655,	// A2 = 0.996552
+		 20756,		// B2 = 0.633423
+		 -14176,	// B1 = -0.865295
+		 20756,		// B0 = 0.633423
+		 22960,		// A1 = -1.401428
+		 -32657,	// A2 = 0.996613
+		 6520,		// B2 = 0.198990
+		 -4619,		// B1 = -0.281937
+		 6520,		// B0 = 0.198990
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1050.txt
+		22142,		// A1 = -1.351501
+		 -32474,	// A2 = 0.991058
+		 -147,		// B2 = -0.004493
+		 0,		// B1 = 0.000000
+		 147,		// B0 = 0.004493
+		 22000,		// A1 = -1.342834
+		 -32655,	// A2 = 0.996552
+		 15379,		// B2 = 0.469360
+		 -10237,	// B1 = -0.624847
+		 15379,		// B0 = 0.469360
+		 22406,		// A1 = -1.367554
+		 -32657,	// A2 = 0.996613
+		 17491,		// B2 = 0.533783
+		 -12096,	// B1 = -0.738312
+		 17491,		// B0 = 0.533783
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f1100_1750[]
+		12973,		// A1 = 0.79184
+		 -24916,	// A2 = -0.760376
+		 6655,		// B2 = 0.203102
+		 367,		// B1 = 0.0224
+		 6657,		// B0 = 0.203171
+		 5915,		// A1 = 0.361053
+		 -29560,	// A2 = -0.90213
+		 -7777,		// B2 = -0.23735
+		 0,		// B1 = 0
+		 7777,		// B0 = 0.23735
+		 20510,		// A1 = 1.251892
+		 -30260,	// A2 = -0.923462
+		 26662,		// B2 = 0.81366
+		 -20573,	// B1 = -1.255737
+		 26668,		// B0 = 0.813843
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1140.txt
+		20392,		// A1 = -1.244629
+		 -32460,	// A2 = 0.990601
+		 -270,		// B2 = -0.008240
+		 0,		// B1 = 0.000000
+		 270,		// B0 = 0.008240
+		 20218,		// A1 = -1.234009
+		 -32655,	// A2 = 0.996582
+		 21337,		// B2 = 0.651154
+		 -13044,	// B1 = -0.796143
+		 21337,		// B0 = 0.651154
+		 20684,		// A1 = -1.262512
+		 -32657,	// A2 = 0.996643
+		 8572,		// B2 = 0.261612
+		 -5476,		// B1 = -0.334244
+		 8572,		// B0 = 0.261612
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1200.txt
+		19159,		// A1 = -1.169373
+		 -32456,	// A2 = 0.990509
+		 -335,		// B2 = -0.010252
+		 0,		// B1 = 0.000000
+		 335,		// B0 = 0.010252
+		 18966,		// A1 = -1.157593
+		 -32661,	// A2 = 0.996735
+		 6802,		// B2 = 0.207588
+		 -3900,		// B1 = -0.238098
+		 6802,		// B0 = 0.207588
+		 19467,		// A1 = -1.188232
+		 -32661,	// A2 = 0.996765
+		 25035,		// B2 = 0.764008
+		 -15049,	// B1 = -0.918579
+		 25035,		// B0 = 0.764008
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1209.txt
+		18976,		// A1 = -1.158264
+		 -32439,	// A2 = 0.989990
+		 -183,		// B2 = -0.005588
+		 0,		// B1 = 0.000000
+		 183,		// B0 = 0.005588
+		 18774,		// A1 = -1.145874
+		 -32650,	// A2 = 0.996429
+		 15468,		// B2 = 0.472076
+		 -8768,		// B1 = -0.535217
+		 15468,		// B0 = 0.472076
+		 19300,		// A1 = -1.177979
+		 -32652,	// A2 = 0.996490
+		 19840,		// B2 = 0.605499
+		 -11842,	// B1 = -0.722809
+		 19840,		// B0 = 0.605499
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1330.txt
+		16357,		// A1 = -0.998413
+		 -32368,	// A2 = 0.987793
+		 -217,		// B2 = -0.006652
+		 0,		// B1 = 0.000000
+		 217,		// B0 = 0.006652
+		 16107,		// A1 = -0.983126
+		 -32601,	// A2 = 0.994904
+		 11602,		// B2 = 0.354065
+		 -5555,		// B1 = -0.339111
+		 11602,		// B0 = 0.354065
+		 16722,		// A1 = -1.020630
+		 -32603,	// A2 = 0.994965
+		 15574,		// B2 = 0.475311
+		 -8176,		// B1 = -0.499069
+		 15574,		// B0 = 0.475311
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1336.txt
+		16234,		// A1 = -0.990875
+		 32404,		// A2 = -0.988922
+		 -193,		// B2 = -0.005908
+		 0,		// B1 = 0.000000
+		 193,		// B0 = 0.005908
+		 15986,		// A1 = -0.975769
+		 -32632,	// A2 = 0.995880
+		 18051,		// B2 = 0.550903
+		 -8658,		// B1 = -0.528473
+		 18051,		// B0 = 0.550903
+		 16591,		// A1 = -1.012695
+		 -32634,	// A2 = 0.995941
+		 15736,		// B2 = 0.480240
+		 -8125,		// B1 = -0.495926
+		 15736,		// B0 = 0.480240
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1366.txt
+		15564,		// A1 = -0.949982
+		 -32404,	// A2 = 0.988922
+		 -269,		// B2 = -0.008216
+		 0,		// B1 = 0.000000
+		 269,		// B0 = 0.008216
+		 15310,		// A1 = -0.934479
+		 -32632,	// A2 = 0.995880
+		 10815,		// B2 = 0.330063
+		 -4962,		// B1 = -0.302887
+		 10815,		// B0 = 0.330063
+		 15924,		// A1 = -0.971924
+		 -32634,	// A2 = 0.995941
+		 18880,		// B2 = 0.576172
+		 -9364,		// B1 = -0.571594
+		 18880,		// B0 = 0.576172
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1380.txt
+		15247,		// A1 = -0.930603
+		 -32397,	// A2 = 0.988708
+		 -244,		// B2 = -0.007451
+		 0,		// B1 = 0.000000
+		 244,		// B0 = 0.007451
+		 14989,		// A1 = -0.914886
+		 -32627,	// A2 = 0.995697
+		 18961,		// B2 = 0.578644
+		 -8498,		// B1 = -0.518707
+		 18961,		// B0 = 0.578644
+		 15608,		// A1 = -0.952667
+		 -32628,	// A2 = 0.995758
+		 11145,		// B2 = 0.340134
+		 -5430,		// B1 = -0.331467
+		 11145,		// B0 = 0.340134
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1400.txt
+		14780,		// A1 = -0.902130
+		 -32393,	// A2 = 0.988586
+		 -396,		// B2 = -0.012086
+		 0,		// B1 = 0.000000
+		 396,		// B0 = 0.012086
+		 14510,		// A1 = -0.885651
+		 -32630,	// A2 = 0.995819
+		 6326,		// B2 = 0.193069
+		 -2747,		// B1 = -0.167671
+		 6326,		// B0 = 0.193069
+		 15154,		// A1 = -0.924957
+		 -32632,	// A2 = 0.995850
+		 23235,		// B2 = 0.709076
+		 -10983,	// B1 = -0.670380
+		 23235,		// B0 = 0.709076
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1477.txt
+		13005,		// A1 = -0.793793
+		 -32368,	// A2 = 0.987823
+		 -500,		// B2 = -0.015265
+		 0,		// B1 = 0.000000
+		 500,		// B0 = 0.015265
+		 12708,		// A1 = -0.775665
+		 -32615,	// A2 = 0.995331
+		 11420,		// B2 = 0.348526
+		 -4306,		// B1 = -0.262833
+		 11420,		// B0 = 0.348526
+		 13397,		// A1 = -0.817688
+		 -32615,	// A2 = 0.995361
+		 9454,		// B2 = 0.288528
+		 -3981,		// B1 = -0.243027
+		 9454,		// B0 = 0.288528
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1600.txt
+		10046,		// A1 = -0.613190
+		 -32331,	// A2 = 0.986694
+		 -455,		// B2 = -0.013915
+		 0,		// B1 = 0.000000
+		 455,		// B0 = 0.013915
+		 9694,		// A1 = -0.591705
+		 -32601,	// A2 = 0.994934
+		 6023,		// B2 = 0.183815
+		 -1708,		// B1 = -0.104279
+		 6023,		// B0 = 0.183815
+		 10478,		// A1 = -0.639587
+		 -32603,	// A2 = 0.994965
+		 22031,		// B2 = 0.672333
+		 -7342,		// B1 = -0.448151
+		 22031,		// B0 = 0.672333
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// f1633_1638[]
+		9181,		// A1 = 0.560394
+		 -32256,	// A2 = -0.984375
+		 -556,		// B2 = -0.016975
+		 0,		// B1 = 0
+		 556,		// B0 = 0.016975
+		 8757,		// A1 = 0.534515
+		 -32574,	// A2 = -0.99408
+		 8443,		// B2 = 0.25769
+		 -2135,		// B1 = -0.130341
+		 8443,		// B0 = 0.25769
+		 9691,		// A1 = 0.591522
+		 -32574,	// A2 = -0.99411
+		 15446,		// B2 = 0.471375
+		 -4809,		// B1 = -0.293579
+		 15446,		// B0 = 0.471375
+		 7,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1800.txt
+		5076,		// A1 = -0.309875
+		 -32304,	// A2 = 0.985840
+		 -508,		// B2 = -0.015503
+		 0,		// B1 = 0.000000
+		 508,		// B0 = 0.015503
+		 4646,		// A1 = -0.283600
+		 -32605,	// A2 = 0.995026
+		 6742,		// B2 = 0.205780
+		 -878,		// B1 = -0.053635
+		 6742,		// B0 = 0.205780
+		 5552,		// A1 = -0.338928
+		 -32605,	// A2 = 0.995056
+		 23667,		// B2 = 0.722260
+		 -4297,		// B1 = -0.262329
+		 23667,		// B0 = 0.722260
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},
+	{			// 1860.txt
+		3569,		// A1 = -0.217865
+		 -32292,	// A2 = 0.985504
+		 -239,		// B2 = -0.007322
+		 0,		// B1 = 0.000000
+		 239,		// B0 = 0.007322
+		 3117,		// A1 = -0.190277
+		 -32603,	// A2 = 0.994965
+		 18658,		// B2 = 0.569427
+		 -1557,		// B1 = -0.095032
+		 18658,		// B0 = 0.569427
+		 4054,		// A1 = -0.247437
+		 -32603,	// A2 = 0.994965
+		 18886,		// B2 = 0.576385
+		 -2566,		// B1 = -0.156647
+		 18886,		// B0 = 0.576385
+		 5,		// Internal filter scaling
+		 159,		// Minimum in-band energy threshold
+		 21,		// 21/32 in-band to broad-band ratio
+		 0x0FF5		// shift-mask 0x0FF (look at 16 half-frames) bit count = 5
+	},};
+
+static int ixj_init_filter(int board, IXJ_FILTER * jf)
+{
+	unsigned short cmd;
+	int cnt, max;
+	IXJ *j = &ixj[board];
+
+	if (jf->filter > 3) {
+		return -1;
+	}
+	if (ixj_WriteDSPCommand(0x5154 + jf->filter, board))	// Select Filter
+
+		return -1;
+
+	if (!jf->enable) {
+		if (ixj_WriteDSPCommand(0x5152, board))		// Disable Filter
+
+			return -1;
+		else
+			return 0;
+	} else {
+		if (ixj_WriteDSPCommand(0x5153, board))		// Enable Filter
+
+			return -1;
+
+		// Select the filter (f0 - f3) to use.
+		if (ixj_WriteDSPCommand(0x5154 + jf->filter, board))
+			return -1;
+	}
+	if (jf->freq < 12 && jf->freq > 3) {
+		// Select the frequency for the selected filter.
+		if (ixj_WriteDSPCommand(0x5170 + jf->freq, board))
+			return -1;
+	} else if (jf->freq > 11) {
+		// We need to load a programmable filter set for undefined
+		// frequencies.  So we will point the filter to a programmable set.
+		// Since there are only 4 filters and 4 programmable sets, we will
+		// just point the filter to the same number set and program it for the
+		// frequency we want.
+		if (ixj_WriteDSPCommand(0x5170 + jf->filter, board))
+			return -1;
+
+		if (j->ver.low != 0x12) {
+			cmd = 0x515B;
+			max = 19;
+		} else {
+			cmd = 0x515E;
+			max = 15;
+		}
+		if (ixj_WriteDSPCommand(cmd, board))
+			return -1;
+
+		for (cnt = 0; cnt < max; cnt++) {
+			if (ixj_WriteDSPCommand(tone_table[jf->freq][cnt], board))
+				return -1;
+		}
+/*    if(j->ver.low != 0x12)
+   {
+   if(ixj_WriteDSPCommand(7, board))
+   return -1;
+   if(ixj_WriteDSPCommand(159, board))
+   return -1;
+   if(ixj_WriteDSPCommand(21, board))
+   return -1;
+   if(ixj_WriteDSPCommand(0x0FF5, board))
+   return -1;
+   } */
+	}
+	return 0;
+}
+
+static int ixj_init_tone(int board, IXJ_TONE * ti)
+{
+	int freq0, freq1;
+	unsigned short data;
+
+	if (ti->freq0) {
+		freq0 = ti->freq0;
+	} else {
+		freq0 = 0x7FFF;
+	}
+
+	if (ti->freq1) {
+		freq1 = ti->freq1;
+	} else {
+		freq1 = 0x7FFF;
+	}
+
+//  if(ti->tone_index > 12 && ti->tone_index < 28)
+	{
+		if (ixj_WriteDSPCommand(0x6800 + ti->tone_index, board))
+			return -1;
+
+		if (ixj_WriteDSPCommand(0x6000 + (ti->gain0 << 4) + ti->gain1, board))
+			return -1;
+
+		data = freq0;
+		if (ixj_WriteDSPCommand(data, board))
+			return -1;
+
+		data = freq1;
+		if (ixj_WriteDSPCommand(data, board))
+			return -1;
+	}
+	return freq0;
+}
diff -urN linux-2.2.14-pre14/drivers/telephony/ixj.h linux-2.2.14-pre15/drivers/telephony/ixj.h
--- linux-2.2.14-pre14/drivers/telephony/ixj.h	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.2.14-pre15/drivers/telephony/ixj.h	2003-08-15 15:09:50.000000000 -0700
@@ -0,0 +1,973 @@
+/*
+ *    ixj.h
+ *
+ *    Device Driver for the Internet PhoneJACK and
+ *    Internet LineJACK Telephony Cards.
+ *
+ *    (c) Copyright 1999 Quicknet Technologies, 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.
+ *
+ * Author:          Ed Okerson, <eokerson@quicknet.net>
+ *    
+ * Contributors:    Greg Herlein, <gherlein@quicknet.net>
+ *                  David W. Erhart, <derhart@quicknet.net>
+ *                  John Sellers, <jsellers@quicknet.net>
+ *                  Mike Preston, <mpreston@quicknet.net>
+ *
+ * More information about the hardware related to this driver can be found
+ * at our website:    http://www.quicknet.net
+ *
+ * Fixes:
+ */
+static char ixj_h_rcsid[] = "$Id: ixj.h,v 3.4 1999/12/16 22:18:36 root Exp root $";
+
+#ifndef _I386_TYPES_H
+#include <asm/types.h>
+#endif
+
+#include "ixjuser.h"
+#include <linux/phonedev.h>
+
+typedef __u16 WORD;
+typedef __u32 DWORD;
+typedef __u8 BYTE;
+typedef __u8 BOOL;
+
+#define IXJMAX 16
+
+#define TRUE 1
+#define FALSE 0
+
+#ifndef min
+#define min(a,b) (((a)<(b))?(a):(b))
+#endif
+#ifndef max
+#define max(a,b) (((a)>(b))?(a):(b))
+#endif
+
+/******************************************************************************
+*
+*  This structure when unioned with the structures below makes simple byte
+*  access to the registers easier.
+*
+******************************************************************************/
+typedef struct {
+	unsigned char low;
+	unsigned char high;
+} BYTES;
+
+int ixj_WriteDSPCommand(unsigned short, int board);
+
+/******************************************************************************
+*
+*  This structure represents the Hardware Control Register of the CT8020/8021
+*  The CT8020 is used in the Internet PhoneJACK, and the 8021 in the
+*  Internet LineJACK
+*
+******************************************************************************/
+typedef struct {
+	unsigned int rxrdy:1;
+	unsigned int txrdy:1;
+	unsigned int status:1;
+	unsigned int auxstatus:1;
+	unsigned int rxdma:1;
+	unsigned int txdma:1;
+	unsigned int rxburst:1;
+	unsigned int txburst:1;
+	unsigned int dmadir:1;
+	unsigned int cont:1;
+	unsigned int irqn:1;
+	unsigned int t:5;
+} HCRBIT;
+
+typedef union {
+	HCRBIT bits;
+	BYTES bytes;
+} HCR;
+
+/******************************************************************************
+*
+*  This structure represents the Hardware Status Register of the CT8020/8021
+*  The CT8020 is used in the Internet PhoneJACK, and the 8021 in the
+*  Internet LineJACK
+*
+******************************************************************************/
+typedef struct {
+	unsigned int controlrdy:1;
+	unsigned int auxctlrdy:1;
+	unsigned int statusrdy:1;
+	unsigned int auxstatusrdy:1;
+	unsigned int rxrdy:1;
+	unsigned int txrdy:1;
+	unsigned int restart:1;
+	unsigned int irqn:1;
+	unsigned int rxdma:1;
+	unsigned int txdma:1;
+	unsigned int cohostshutdown:1;
+	unsigned int t:5;
+} HSRBIT;
+
+typedef union {
+	HSRBIT bits;
+	BYTES bytes;
+} HSR;
+
+/******************************************************************************
+*
+*  This structure represents the General Purpose IO Register of the CT8020/8021
+*  The CT8020 is used in the Internet PhoneJACK, and the 8021 in the
+*  Internet LineJACK
+*
+******************************************************************************/
+typedef struct {
+	unsigned int x:1;
+	unsigned int gpio1:1;
+	unsigned int gpio2:1;
+	unsigned int gpio3:1;
+	unsigned int gpio4:1;
+	unsigned int gpio5:1;
+	unsigned int gpio6:1;
+	unsigned int gpio7:1;
+	unsigned int xread:1;
+	unsigned int gpio1read:1;
+	unsigned int gpio2read:1;
+	unsigned int gpio3read:1;
+	unsigned int gpio4read:1;
+	unsigned int gpio5read:1;
+	unsigned int gpio6read:1;
+	unsigned int gpio7read:1;
+} GPIOBIT;
+
+typedef union {
+	GPIOBIT bits;
+	BYTES bytes;
+	unsigned short word;
+} GPIO;
+
+/******************************************************************************
+*
+*  This structure represents the Line Monitor status response
+*
+******************************************************************************/
+typedef struct {
+	unsigned int digit:4;
+	unsigned int cpf_valid:1;
+	unsigned int dtmf_valid:1;
+	unsigned int peak:1;
+	unsigned int z:1;
+	unsigned int f0:1;
+	unsigned int f1:1;
+	unsigned int f2:1;
+	unsigned int f3:1;
+	unsigned int frame:4;
+} LMON;
+
+typedef union {
+	LMON bits;
+	BYTES bytes;
+} DTMF;
+
+typedef struct {
+	unsigned int z:7;
+	unsigned int dtmf_en:1;
+	unsigned int y:4;
+	unsigned int F3:1;
+	unsigned int F2:1;
+	unsigned int F1:1;
+	unsigned int F0:1;
+} CP;
+
+typedef union {
+	CP bits;
+	BYTES bytes;
+} CPTF;
+
+/******************************************************************************
+*
+*  This structure represents the Status Control Register on the Internet
+*  LineJACK
+*
+******************************************************************************/
+typedef struct {
+	unsigned int c0:1;
+	unsigned int c1:1;
+	unsigned int stereo:1;
+	unsigned int daafsyncen:1;
+	unsigned int led1:1;
+	unsigned int led2:1;
+	unsigned int led3:1;
+	unsigned int led4:1;
+} PSCRWI;			// Internet LineJACK and Internet PhoneJACK Lite
+
+typedef struct {
+	unsigned int eidp:1;
+	unsigned int eisd:1;
+	unsigned int x:6;
+} PSCRWP;			// Internet PhoneJACK PCI
+
+typedef union {
+	PSCRWI bits;
+	PSCRWP pcib;
+	char byte;
+} PLD_SCRW;
+
+typedef struct {
+	unsigned int c0:1;
+	unsigned int c1:1;
+	unsigned int x:1;
+	unsigned int d0ee:1;
+	unsigned int mixerbusy:1;
+	unsigned int sci:1;
+	unsigned int dspflag:1;
+	unsigned int daaflag:1;
+} PSCRRI;
+
+typedef struct {
+	unsigned int eidp:1;
+	unsigned int eisd:1;
+	unsigned int x:4;
+	unsigned int dspflag:1;
+	unsigned int det:1;
+} PSCRRP;
+
+typedef union {
+	PSCRRI bits;
+	PSCRRP pcib;
+	char byte;
+} PLD_SCRR;
+
+/******************************************************************************
+*
+*  These structures represents the SLIC Control Register on the
+*  Internet LineJACK
+*
+******************************************************************************/
+typedef struct {
+	unsigned int c1:1;
+	unsigned int c2:1;
+	unsigned int c3:1;
+	unsigned int b2en:1;
+	unsigned int spken:1;
+	unsigned int rly1:1;
+	unsigned int rly2:1;
+	unsigned int rly3:1;
+} PSLICWRITE;
+
+typedef struct {
+	unsigned int state:3;
+	unsigned int b2en:1;
+	unsigned int spken:1;
+	unsigned int c3:1;
+	unsigned int potspstn:1;
+	unsigned int det:1;
+} PSLICREAD;
+
+typedef struct {
+	unsigned int c1:1;
+	unsigned int c2:1;
+	unsigned int c3:1;
+	unsigned int b2en:1;
+	unsigned int e1:1;
+	unsigned int mic:1;
+	unsigned int spk:1;
+	unsigned int x:1;
+} PSLICPCI;
+
+typedef union {
+	PSLICPCI pcib;
+	PSLICWRITE bits;
+	PSLICREAD slic;
+	char byte;
+} PLD_SLICW;
+
+typedef union {
+	PSLICPCI pcib;
+	PSLICREAD bits;
+	char byte;
+} PLD_SLICR;
+
+/******************************************************************************
+*
+*  These structures represents the Clock Control Register on the
+*  Internet LineJACK
+*
+******************************************************************************/
+typedef struct {
+	unsigned int clk0:1;
+	unsigned int clk1:1;
+	unsigned int clk2:1;
+	unsigned int x0:1;
+	unsigned int slic_e1:1;
+	unsigned int x1:1;
+	unsigned int x2:1;
+	unsigned int x3:1;
+} PCLOCK;
+
+typedef union {
+	PCLOCK bits;
+	char byte;
+} PLD_CLOCK;
+
+/******************************************************************************
+*
+*  These structures deal with the mixer on the Internet LineJACK
+*
+******************************************************************************/
+
+typedef struct {
+	unsigned short vol[10];
+	unsigned int recsrc;
+	unsigned int modcnt;
+	unsigned short micpreamp;
+} MIX;
+
+/******************************************************************************
+*
+*  These structures deal with the DAA on the Internet LineJACK
+*
+******************************************************************************/
+
+typedef struct _DAA_REGS {
+	//-----------------------------------------------
+	// SOP Registers
+	//
+	BYTE bySOP;
+
+	union _SOP_REGS {
+		struct _SOP {
+			union	// SOP - CR0 Register
+			 {
+				BYTE reg;
+				struct _CR0_BITREGS {
+					BYTE CLK_EXT:1;		// cr0[0:0]
+
+					BYTE RIP:1;	// cr0[1:1]
+
+					BYTE AR:1;	// cr0[2:2]
+
+					BYTE AX:1;	// cr0[3:3]
+
+					BYTE FRR:1;	// cr0[4:4]
+
+					BYTE FRX:1;	// cr0[5:5]
+
+					BYTE IM:1;	// cr0[6:6]
+
+					BYTE TH:1;	// cr0[7:7]
+
+				} bitreg;
+			} cr0;
+
+			union	// SOP - CR1 Register
+			 {
+				BYTE reg;
+				struct _CR1_REGS {
+					BYTE RM:1;	// cr1[0:0]
+
+					BYTE RMR:1;	// cr1[1:1]
+
+					BYTE No_auto:1;		// cr1[2:2]
+
+					BYTE Pulse:1;	// cr1[3:3]
+
+					BYTE P_Tone1:1;		// cr1[4:4]
+
+					BYTE P_Tone2:1;		// cr1[5:5]
+
+					BYTE E_Tone1:1;		// cr1[6:6]
+
+					BYTE E_Tone2:1;		// cr1[7:7]
+
+				} bitreg;
+			} cr1;
+
+			union	// SOP - CR2 Register
+			 {
+				BYTE reg;
+				struct _CR2_REGS {
+					BYTE Call_II:1;		// CR2[0:0]
+
+					BYTE Call_I:1;	// CR2[1:1]
+
+					BYTE Call_en:1;		// CR2[2:2]
+
+					BYTE Call_pon:1;	// CR2[3:3]
+
+					BYTE IDR:1;	// CR2[4:4]
+
+					BYTE COT_R:3;	// CR2[5:7]
+
+				} bitreg;
+			} cr2;
+
+			union	// SOP - CR3 Register
+			 {
+				BYTE reg;
+				struct _CR3_REGS {
+					BYTE DHP_X:1;	// CR3[0:0]
+
+					BYTE DHP_R:1;	// CR3[1:1]
+
+					BYTE Cal_pctl:1;	// CR3[2:2]
+
+					BYTE SEL:1;	// CR3[3:3]
+
+					BYTE TestLoops:4;	// CR3[4:7]
+
+				} bitreg;
+			} cr3;
+
+			union	// SOP - CR4 Register
+			 {
+				BYTE reg;
+				struct _CR4_REGS {
+					BYTE Fsc_en:1;	// CR4[0:0]
+
+					BYTE Int_en:1;	// CR4[1:1]
+
+					BYTE AGX:2;	// CR4[2:3]
+
+					BYTE AGR_R:2;	// CR4[4:5]
+
+					BYTE AGR_Z:2;	// CR4[6:7]
+
+				} bitreg;
+			} cr4;
+
+			union	// SOP - CR5 Register
+			 {
+				BYTE reg;
+				struct _CR5_REGS {
+					BYTE V_0:1;	// CR5[0:0]
+
+					BYTE V_1:1;	// CR5[1:1]
+
+					BYTE V_2:1;	// CR5[2:2]
+
+					BYTE V_3:1;	// CR5[3:3]
+
+					BYTE V_4:1;	// CR5[4:4]
+
+					BYTE V_5:1;	// CR5[5:5]
+
+					BYTE V_6:1;	// CR5[6:6]
+
+					BYTE V_7:1;	// CR5[7:7]
+
+				} bitreg;
+			} cr5;
+
+			union	// SOP - CR6 Register
+			 {
+				BYTE reg;
+				struct _CR6_REGS {
+					BYTE reserved:8;	// CR6[0:7]
+
+				} bitreg;
+			} cr6;
+
+			union	// SOP - CR7 Register
+			 {
+				BYTE reg;
+				struct _CR7_REGS {
+					BYTE reserved:8;	// CR7[0:7]
+
+				} bitreg;
+			} cr7;
+		} SOP;
+
+		BYTE ByteRegs[sizeof(struct _SOP)];
+
+	} SOP_REGS;
+
+	// DAA_REGS.SOP_REGS.SOP.CR5.reg
+	// DAA_REGS.SOP_REGS.SOP.CR5.bitreg
+	// DAA_REGS.SOP_REGS.SOP.CR5.bitreg.V_2
+	// DAA_REGS.SOP_REGS.ByteRegs[5]
+
+	//-----------------------------------------------
+	// XOP Registers
+	//
+	BYTE byXOP;
+
+	union _XOP_REGS {
+		struct _XOP {
+			union	// XOP - XR0 Register - Read values
+			 {
+				BYTE reg;
+				struct _XR0_BITREGS {
+					BYTE SI_0:1;	// XR0[0:0] - Read
+
+					BYTE SI_1:1;	// XR0[1:1] - Read
+
+					BYTE VDD_OK:1;	// XR0[2:2] - Read
+
+					BYTE Caller_ID:1;	// XR0[3:3] - Read
+
+					BYTE RING:1;	// XR0[4:4] - Read
+
+					BYTE Cadence:1;		// XR0[5:5] - Read
+
+					BYTE Wake_up:1;		// XR0[6:6] - Read
+
+					BYTE unused:1;	// XR0[7:7] - Read
+
+				} bitreg;
+			} xr0;
+
+			union	// XOP - XR1 Register
+			 {
+				BYTE reg;
+				struct _XR1_BITREGS {
+					BYTE M_SI_0:1;	// XR1[0:0]
+
+					BYTE M_SI_1:1;	// XR1[1:1]
+
+					BYTE M_VDD_OK:1;	// XR1[2:2]
+
+					BYTE M_Caller_ID:1;	// XR1[3:3]
+
+					BYTE M_RING:1;	// XR1[4:4]
+
+					BYTE M_Cadence:1;	// XR1[5:5]
+
+					BYTE M_Wake_up:1;	// XR1[6:6]
+
+					BYTE unused:1;	// XR1[7:7]
+
+				} bitreg;
+			} xr1;
+
+			union	// XOP - XR2 Register
+			 {
+				BYTE reg;
+				struct _XR2_BITREGS {
+					BYTE CTO0:1;	// XR2[0:0]
+
+					BYTE CTO1:1;	// XR2[1:1]
+
+					BYTE CTO2:1;	// XR2[2:2]
+
+					BYTE CTO3:1;	// XR2[3:3]
+
+					BYTE CTO4:1;	// XR2[4:4]
+
+					BYTE CTO5:1;	// XR2[5:5]
+
+					BYTE CTO6:1;	// XR2[6:6]
+
+					BYTE CTO7:1;	// XR2[7:7]
+
+				} bitreg;
+			} xr2;
+
+			union	// XOP - XR3 Register
+			 {
+				BYTE reg;
+				struct _XR3_BITREGS {
+					BYTE DCR0:1;	// XR3[0:0]
+
+					BYTE DCR1:1;	// XR3[1:1]
+
+					BYTE DCI:1;	// XR3[2:2]
+
+					BYTE DCU0:1;	// XR3[3:3]
+
+					BYTE DCU1:1;	// XR3[4:4]
+
+					BYTE B_off:1;	// XR3[5:5]
+
+					BYTE AGB0:1;	// XR3[6:6]
+
+					BYTE AGB1:1;	// XR3[7:7]
+
+				} bitreg;
+			} xr3;
+
+			union	// XOP - XR4 Register
+			 {
+				BYTE reg;
+				struct _XR4_BITREGS {
+					BYTE C_0:1;	// XR4[0:0]
+
+					BYTE C_1:1;	// XR4[1:1]
+
+					BYTE C_2:1;	// XR4[2:2]
+
+					BYTE C_3:1;	// XR4[3:3]
+
+					BYTE C_4:1;	// XR4[4:4]
+
+					BYTE C_5:1;	// XR4[5:5]
+
+					BYTE C_6:1;	// XR4[6:6]
+
+					BYTE C_7:1;	// XR4[7:7]
+
+				} bitreg;
+			} xr4;
+
+			union	// XOP - XR5 Register
+			 {
+				BYTE reg;
+				struct _XR5_BITREGS {
+					BYTE T_0:1;	// XR5[0:0]
+
+					BYTE T_1:1;	// XR5[1:1]
+
+					BYTE T_2:1;	// XR5[2:2]
+
+					BYTE T_3:1;	// XR5[3:3]
+
+					BYTE T_4:1;	// XR5[4:4]
+
+					BYTE T_5:1;	// XR5[5:5]
+
+					BYTE T_6:1;	// XR5[6:6]
+
+					BYTE T_7:1;	// XR5[7:7]
+
+				} bitreg;
+			} xr5;
+
+			union	// XOP - XR6 Register - Read Values
+			 {
+				BYTE reg;
+				struct _XR6_BITREGS {
+					BYTE CPS0:1;	// XR6[0:0]
+
+					BYTE CPS1:1;	// XR6[1:1]
+
+					BYTE unused1:2;		// XR6[2:3]
+
+					BYTE CLK_OFF:1;		// XR6[4:4]
+
+					BYTE unused2:3;		// XR6[5:7]
+
+				} bitreg;
+			} xr6;
+
+			union	// XOP - XR7 Register
+			 {
+				BYTE reg;
+				struct _XR7_BITREGS {
+					BYTE unused1:1;		// XR7[0:0]
+
+					BYTE Vdd0:1;	// XR7[1:1]
+
+					BYTE Vdd1:1;	// XR7[2:2]
+
+					BYTE unused2:5;		// XR7[3:7]
+
+				} bitreg;
+			} xr7;
+		} XOP;
+
+		BYTE ByteRegs[sizeof(struct _XOP)];
+
+	} XOP_REGS;
+
+	// DAA_REGS.XOP_REGS.XOP.XR7.reg
+	// DAA_REGS.XOP_REGS.XOP.XR7.bitreg
+	// DAA_REGS.XOP_REGS.XOP.XR7.bitreg.Vdd0
+	// DAA_REGS.XOP_REGS.ByteRegs[7]
+
+	//-----------------------------------------------
+	// COP Registers
+	//
+	BYTE byCOP;
+
+	union _COP_REGS {
+		struct _COP {
+			BYTE THFilterCoeff_1[8];	// COP - TH Filter Coefficients,      CODE=0, Part 1
+
+			BYTE THFilterCoeff_2[8];	// COP - TH Filter Coefficients,      CODE=1, Part 2
+
+			BYTE THFilterCoeff_3[8];	// COP - TH Filter Coefficients,      CODE=2, Part 3
+
+			BYTE RingerImpendance_1[8];	// COP - Ringer Impendance Coefficients,  CODE=3, Part 1
+
+			BYTE IMFilterCoeff_1[8];	// COP - IM Filter Coefficients,      CODE=4, Part 1
+
+			BYTE IMFilterCoeff_2[8];	// COP - IM Filter Coefficients,      CODE=5, Part 2
+
+			BYTE RingerImpendance_2[8];	// COP - Ringer Impendance Coefficients,  CODE=6, Part 2
+
+			BYTE FRRFilterCoeff[8];		// COP - FRR Filter Coefficients,      CODE=7
+
+			BYTE FRXFilterCoeff[8];		// COP - FRX Filter Coefficients,      CODE=8
+
+			BYTE ARFilterCoeff[4];	// COP - AR Filter Coefficients,      CODE=9
+
+			BYTE AXFilterCoeff[4];	// COP - AX Filter Coefficients,      CODE=10 
+
+			BYTE Tone1Coeff[4];	// COP - Tone1 Coefficients,        CODE=11
+
+			BYTE Tone2Coeff[4];	// COP - Tone2 Coefficients,        CODE=12
+
+			BYTE LevelmeteringRinging[4];	// COP - Levelmetering Ringing,        CODE=13
+
+			BYTE CallerID1stTone[8];	// COP - Caller ID 1st Tone,        CODE=14
+
+			BYTE CallerID2ndTone[8];	// COP - Caller ID 2nd Tone,        CODE=15
+
+		} COP;
+
+		BYTE ByteRegs[sizeof(struct _COP)];
+
+	} COP_REGS;
+
+	// DAA_REGS.COP_REGS.COP.XR7.Tone1Coeff[3]
+	// DAA_REGS.COP_REGS.COP.XR7.bitreg
+	// DAA_REGS.COP_REGS.COP.XR7.bitreg.Vdd0
+	// DAA_REGS.COP_REGS.ByteRegs[57]
+
+	//-----------------------------------------------
+	// CAO Registers
+	//
+	BYTE byCAO;
+
+	union _CAO_REGS {
+		struct _CAO {
+			BYTE CallerID[512];	// CAO - Caller ID Bytes
+
+		} CAO;
+
+		BYTE ByteRegs[sizeof(struct _CAO)];
+	} CAO_REGS;
+
+	union			// XOP - XR0 Register - Write values
+	 {
+		BYTE reg;
+		struct _XR0_BITREGSW {
+			BYTE SO_0:1;	// XR1[0:0] - Write
+
+			BYTE SO_1:1;	// XR1[1:1] - Write
+
+			BYTE SO_2:1;	// XR1[2:2] - Write
+
+			BYTE unused:5;	// XR1[3:7] - Write
+
+		} bitreg;
+	} XOP_xr0_W;
+
+	union			// XOP - XR6 Register - Write values
+	 {
+		BYTE reg;
+		struct _XR6_BITREGSW {
+			BYTE unused1:4;		// XR6[0:3]
+
+			BYTE CLK_OFF:1;		// XR6[4:4]
+
+			BYTE unused2:3;		// XR6[5:7]
+
+		} bitreg;
+	} XOP_xr6_W;
+
+} DAA_REGS;
+
+#define ALISDAA_ID_BYTE      0x81
+#define ALISDAA_CALLERID_SIZE  512
+
+//------------------------------
+//
+//  Misc definitions
+//
+
+// Power Up Operation
+#define SOP_PU_SLEEP    0
+#define SOP_PU_RINGING    1
+#define SOP_PU_CONVERSATION  2
+#define SOP_PU_PULSEDIALING  3
+
+#define ALISDAA_CALLERID_SIZE 512
+
+#define PLAYBACK_MODE_COMPRESSED	0	//        Selects: Compressed modes, TrueSpeech 8.5-4.1, G.723.1, G.722, G.728, G.729
+#define PLAYBACK_MODE_TRUESPEECH_V40	0	//        Selects: TrueSpeech 8.5, 6.3, 5.3, 4.8 or 4.1 Kbps
+#define PLAYBACK_MODE_TRUESPEECH	8	//        Selects: TrueSpeech 8.5, 6.3, 5.3, 4.8 or 4.1 Kbps Version 5.1
+#define PLAYBACK_MODE_ULAW		2	//        Selects: 64 Kbit/sec MuA-law PCM
+#define PLAYBACK_MODE_ALAW		10	//        Selects: 64 Kbit/sec A-law PCM
+#define PLAYBACK_MODE_16LINEAR		6	//        Selects: 128 Kbit/sec 16-bit linear
+#define PLAYBACK_MODE_8LINEAR		4	//        Selects: 64 Kbit/sec 8-bit signed linear
+#define PLAYBACK_MODE_8LINEAR_WSS	5	//        Selects: 64 Kbit/sec WSS 8-bit unsigned linear
+
+#define RECORD_MODE_COMPRESSED		0	//        Selects: Compressed modes, TrueSpeech 8.5-4.1, G.723.1, G.722, G.728, G.729
+#define RECORD_MODE_TRUESPEECH		0	//        Selects: TrueSpeech 8.5, 6.3, 5.3, 4.8 or 4.1 Kbps
+#define RECORD_MODE_ULAW		4	//        Selects: 64 Kbit/sec Mu-law PCM
+#define RECORD_MODE_ALAW		12	//        Selects: 64 Kbit/sec A-law PCM
+#define RECORD_MODE_16LINEAR		5	//        Selects: 128 Kbit/sec 16-bit linear
+#define RECORD_MODE_8LINEAR		6	//        Selects: 64 Kbit/sec 8-bit signed linear
+#define RECORD_MODE_8LINEAR_WSS		7	//        Selects: 64 Kbit/sec WSS 8-bit unsigned linear
+
+enum SLIC_STATES {
+	PLD_SLIC_STATE_OC = 0,
+	PLD_SLIC_STATE_RINGING,
+	PLD_SLIC_STATE_ACTIVE,
+	PLD_SLIC_STATE_OHT,
+	PLD_SLIC_STATE_TIPOPEN,
+	PLD_SLIC_STATE_STANDBY,
+	PLD_SLIC_STATE_APR,
+	PLD_SLIC_STATE_OHTPR
+};
+
+enum SCI_CONTROL {
+	SCI_End = 0,
+	SCI_Enable_DAA,
+	SCI_Enable_Mixer,
+	SCI_Enable_EEPROM
+};
+
+enum Mode {
+	T63, T53, T48, T40
+};
+enum Dir {
+	V3_TO_V4, V4_TO_V3, V4_TO_V5, V5_TO_V4
+};
+
+typedef struct Proc_Info_Tag {
+	enum Mode convert_mode;
+	enum Dir convert_dir;
+	int Prev_Frame_Type;
+	int Current_Frame_Type;
+} Proc_Info_Type;
+
+enum PREVAL {
+	NORMAL = 0,
+	NOPOST,
+	POSTONLY,
+	PREERROR
+};
+
+enum IXJ_EXTENSIONS {
+	G729LOADER = 0,
+	TS85LOADER,
+	PRE_READ,
+	POST_READ,
+	PRE_WRITE,
+	POST_WRITE,
+	PRE_IOCTL,
+	POST_IOCTL
+};
+
+typedef struct {
+	unsigned int busytone:1;
+	unsigned int dialtone:1;
+	unsigned int ringback:1;
+	unsigned int ringing:1;
+	unsigned int cringing:1;
+	unsigned int play_first_frame:1;
+	unsigned int pstn_present:1;
+	unsigned int pstn_ringing:1;
+	unsigned int pots_correct:1;
+	unsigned int pots_pstn:1;
+	unsigned int g729_loaded:1;
+	unsigned int ts85_loaded:1;
+	unsigned int dtmf_oob:1;	// DTMF Out-Of-Band
+
+} IXJ_FLAGS;
+
+/******************************************************************************
+*
+*  This structure represents the Internet PhoneJACK and Internet LineJACK
+*
+******************************************************************************/
+
+typedef struct {
+	struct phone_device p;
+	unsigned int board;
+	unsigned int DSPbase;
+	unsigned int XILINXbase;
+	unsigned int serial;
+	struct phone_capability caplist[30];
+	unsigned int caps;
+	struct pnp_dev *dev;
+	unsigned int cardtype;
+	unsigned int rec_codec;
+	char rec_mode;
+	unsigned int play_codec;
+	char play_mode;
+	IXJ_FLAGS flags;
+	unsigned int rec_frame_size;
+	unsigned int play_frame_size;
+	int aec_level;
+	int readers, writers;
+	struct wait_queue *poll_q;
+	struct wait_queue *read_q;
+	char *read_buffer, *read_buffer_end;
+	char *read_convert_buffer;
+	unsigned int read_buffer_size;
+	unsigned int read_buffer_ready;
+	struct wait_queue *write_q;
+	char *write_buffer, *write_buffer_end;
+	char *write_convert_buffer;
+	unsigned int write_buffer_size;
+	unsigned int write_buffers_empty;
+	unsigned long drybuffer;
+	char *write_buffer_rp, *write_buffer_wp;
+	char dtmfbuffer[80];
+	char dtmf_current;
+	int dtmf_wp, dtmf_rp, dtmf_state, dtmf_proc;
+	int tone_off_time, tone_on_time;
+	struct fasync_struct *async_queue;
+	unsigned long tone_start_jif;
+	char tone_index;
+	char tone_state;
+	char maxrings;
+	IXJ_CADENCE *cadence_t;
+	int tone_cadence_state;
+	DTMF dtmf;
+	CPTF cptf;
+	BYTES dsp;
+	BYTES ver;
+	BYTES scr;
+	BYTES ssr;
+	BYTES baseframe;
+	HSR hsr;
+	GPIO gpio;
+	PLD_SCRR pld_scrr;
+	PLD_SCRW pld_scrw;
+	PLD_SLICW pld_slicw;
+	PLD_SLICR pld_slicr;
+	PLD_CLOCK pld_clock;
+	MIX mix;
+	unsigned short ring_cadence;
+	int ring_cadence_t;
+	unsigned long ring_cadence_jif;
+	int intercom;
+	int m_hook;
+	int r_hook;
+	char pstn_envelope;
+	char pstn_cid_intr;
+	unsigned pstn_cid_recieved;
+	IXJ_CID cid;
+	unsigned long pstn_ring_start;
+	unsigned long pstn_winkstart;
+	unsigned int winktime;
+	char port;
+	union telephony_exception ex;
+	char daa_mode;
+	unsigned long pstn_sleeptil;
+	DAA_REGS m_DAAShadowRegs;
+	Proc_Info_Type Info_read;
+	Proc_Info_Type Info_write;
+	unsigned short frame_count;
+	unsigned int filter_cadence;
+	unsigned int filter_hist[4];
+	unsigned short proc_load;
+	unsigned long framesread;
+	unsigned long frameswritten;
+	unsigned long read_wait;
+	unsigned long write_wait;
+	unsigned long timerchecks;
+	unsigned long txreadycheck;
+	unsigned long rxreadycheck;
+} IXJ;
+
+typedef int (*IXJ_REGFUNC) (IXJ * j, unsigned long arg);
+
+int ixj_register(int index, IXJ_REGFUNC regfunc);
+int ixj_unregister(int index);
diff -urN linux-2.2.14-pre14/drivers/telephony/ixjuser.h linux-2.2.14-pre15/drivers/telephony/ixjuser.h
--- linux-2.2.14-pre14/drivers/telephony/ixjuser.h	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.2.14-pre15/drivers/telephony/ixjuser.h	2003-08-15 15:09:50.000000000 -0700
@@ -0,0 +1,629 @@
+/*
+ *    ixjuser.h
+ *
+ *    User-space include file for the Internet PhoneJACK and
+ *    Internet LineJACK Telephony Cards.
+ *
+ *    (c) Copyright 1999 Quicknet Technologies, 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.
+ *
+ * Author:          Ed Okerson, <eokerson@quicknet.net>
+ *    
+ * Contributors:    Greg Herlein, <gherlein@quicknet.net>
+ *                  David W. Erhart, <derhart@quicknet.net>
+ *                  John Sellers, <jsellers@quicknet.net>
+ *                  Mike Preston, <mpreston@quicknet.net>
+ *
+ * More information about the hardware related to this driver can be found
+ * at our website:    http://www.quicknet.net
+ *
+ * Fixes:
+ */
+
+static char ixjuser_h_rcsid[] = "$Id: ixjuser.h,v 3.4 1999/12/16 22:18:36 root Exp root $";
+
+#include <linux/telephony.h>
+
+/***************************************************************************
+
+  If you use the IXJCTL_TESTRAM command, the card must be power
+  cycled to reset the SRAM values before futher use.
+
+***************************************************************************/
+#define IXJCTL_DSP_RESET 		_IO  ('q', 0xC0)
+
+#define IXJCTL_RING         PHONE_RING
+#define IXJCTL_HOOKSTATE    PHONE_HOOKSTATE
+#define IXJCTL_MAXRINGS			PHONE_MAXRINGS
+#define IXJCTL_RING_CADENCE	PHONE_RING_CADENCE
+#define IXJCTL_RING_START		PHONE_RING_START
+#define IXJCTL_RING_STOP		PHONE_RING_STOP
+
+#define IXJCTL_CARDTYPE			_IOR ('q', 0xC1, int)
+#define IXJCTL_SERIAL			  _IOR ('q', 0xC2, int)
+#define IXJCTL_DSP_TYPE     _IOR ('q', 0xC3, int)
+#define IXJCTL_DSP_VERSION  _IOR ('q', 0xC4, int)
+#define IXJCTL_DSP_IDLE			_IO  ('q', 0xC5)
+#define IXJCTL_TESTRAM			_IO  ('q', 0xC6)
+
+/******************************************************************************
+*
+* This group of IOCTLs deal with the record settings of the DSP
+*
+* The IXJCTL_REC_DEPTH command sets the internal buffer depth of the DSP.
+* Setting a lower depth reduces latency, but increases the demand of the
+* application to service the driver without frame loss.  The DSP has 480
+* bytes of physical buffer memory for the record channel so the true
+* maximum limit is determined by how many frames will fit in the buffer.
+*
+* 1 uncompressed (480 byte) 16-bit linear frame.
+* 2 uncompressed (240 byte) 8-bit A-law/mu-law frames.
+* 15 TrueSpeech 8.5 frames.
+* 20 TrueSpeech 6.3,5.3,4.8 or 4.1 frames.
+*
+* The default in the driver is currently set to 2 frames.
+*
+* The IXJCTL_REC_VOLUME and IXJCTL_PLAY_VOLUME commands both use a Q8
+* number as a parameter, 0x100 scales the signal by 1.0, 0x200 scales the
+* signal by 2.0, 0x80 scales the signal by 0.5.  No protection is given
+* against over-scaling, if the multiplication factor times the input
+* signal exceeds 16 bits, overflow distortion will occur.  The default
+* setting is 0x100 (1.0).
+*
+* The IXJCTL_REC_LEVEL returns the average signal level (not r.m.s.) on
+* the most recently recorded frame as a 16 bit value.
+******************************************************************************/
+
+#define IXJCTL_REC_CODEC                PHONE_REC_CODEC
+#define IXJCTL_REC_START                PHONE_REC_START
+#define IXJCTL_REC_STOP                 PHONE_REC_STOP
+#define IXJCTL_REC_DEPTH		PHONE_REC_DEPTH
+#define IXJCTL_FRAME			PHONE_FRAME
+#define IXJCTL_REC_VOLUME		PHONE_REC_VOLUME
+#define IXJCTL_REC_LEVEL		PHONE_REC_LEVEL
+
+typedef enum {
+	f300_640 = 4, f300_500, f1100, f350, f400, f480, f440, f620, f20_50,
+	f133_200, f300, f300_420, f330, f300_425, f330_440, f340, f350_400,
+	f350_440, f350_450, f360, f380_420, f392, f400_425, f400_440, f400_450,
+	f420, f425, f425_450, f425_475, f435, f440_450, f440_480, f445, f450,
+	f452, f475, f480_620, f494, f500, f520, f523, f525, f540_660, f587,
+	f590, f600, f660, f700, f740, f750, f750_1450, f770, f800, f816, f850,
+	f857_1645, f900, f900_1300, f935_1215, f941_1477, f942, f950, f950_1400,
+	f975, f1000, f1020, f1050, f1100_1750, f1140, f1200, f1209, f1330, f1336,
+	lf1366, f1380, f1400, f1477, f1600, f1633_1638, f1800, f1860
+} IXJ_FILTER_FREQ;
+
+typedef struct {
+	unsigned int filter;
+	IXJ_FILTER_FREQ freq;
+	char enable;
+} IXJ_FILTER;
+
+#define IXJCTL_SET_FILTER		_IOW ('q', 0xC7, IXJ_FILTER *)
+#define IXJCTL_GET_FILTER_HIST		_IOW ('q', 0xC8, int)
+/******************************************************************************
+*
+* This IOCTL allows you to reassign values in the tone index table.  The
+* tone table has 32 entries (0 - 31), but the driver only allows entries
+* 13 - 27 to be modified, entry 0 is reserved for silence and 1 - 12 are
+* the standard DTMF digits and 28 - 31 are the DTMF tones for A, B, C & D.
+* The positions used internally for Call Progress Tones are as follows:
+*    Dial Tone   - 25
+*    Ring Back   - 26
+*    Busy Signal - 27
+*
+* The freq values are calculated as:
+* freq = cos(2 * PI * frequency / 8000)
+*
+* The most commonly needed values are already calculated and listed in the
+* enum IXJ_TONE_FREQ.  Each tone index can have two frequencies with
+* different gains, if you are only using a single frequency set the unused
+* one to 0.
+*
+* The gain values range from 0 to 15 indicating +6dB to -24dB in 2dB
+* increments.
+*
+******************************************************************************/
+
+typedef enum {
+	hz20 = 0x7ffa,
+	hz50 = 0x7fe5,
+	hz133 = 0x7f4c,
+	hz200 = 0x7e6b,
+	hz261 = 0x7d50,		/* .63 C1  */
+	hz277 = 0x7cfa,		/* .18 CS1 */
+	hz293 = 0x7c9f,		/* .66 D1  */
+	hz300 = 0x7c75,
+	hz311 = 0x7c32,		/* .13 DS1 */
+	hz329 = 0x7bbf,		/* .63 E1  */
+	hz330 = 0x7bb8,
+	hz340 = 0x7b75,
+	hz349 = 0x7b37,		/* .23 F1  */
+	hz350 = 0x7b30,
+	hz360 = 0x7ae9,
+	hz369 = 0x7aa8,		/* .99 FS1 */
+	hz380 = 0x7a56,
+	hz392 = 0x79fa,		/* .00 G1  */
+	hz400 = 0x79bb,
+	hz415 = 0x7941,		/* .30 GS1 */
+	hz420 = 0x7918,
+	hz425 = 0x78ee,
+	hz435 = 0x7899,
+	hz440 = 0x786d,		/* .00 A1  */
+	hz445 = 0x7842,
+	hz450 = 0x7815,
+	hz452 = 0x7803,
+	hz466 = 0x7784,		/* .16 AS1 */
+	hz475 = 0x7731,
+	hz480 = 0x7701,
+	hz493 = 0x7685,		/* .88 B1  */
+	hz494 = 0x767b,
+	hz500 = 0x7640,
+	hz520 = 0x7578,
+	hz523 = 0x7559,		/* .25 C2  */
+	hz525 = 0x7544,
+	hz540 = 0x74a7,
+	hz554 = 0x7411,		/* .37 CS2 */
+	hz587 = 0x72a1,		/* .33 D2  */
+	hz590 = 0x727f,
+	hz600 = 0x720b,
+	hz620 = 0x711e,
+	hz622 = 0x7106,		/* .25 DS2 */
+	hz659 = 0x6f3b,		/* .26 E2  */
+	hz660 = 0x6f2e,
+	hz698 = 0x6d3d,		/* .46 F2  */
+	hz700 = 0x6d22,
+	hz739 = 0x6b09,		/* .99 FS2 */
+	hz740 = 0x6afa,
+	hz750 = 0x6a6c,
+	hz770 = 0x694b,
+	hz783 = 0x688b,		/* .99 G2  */
+	hz800 = 0x678d,
+	hz816 = 0x6698,
+	hz830 = 0x65bf,		/* .61 GS2 */
+	hz850 = 0x6484,
+	hz857 = 0x6414,
+	hz880 = 0x629f,		/* .00 A2  */
+	hz900 = 0x6154,
+	hz932 = 0x5f35,		/* .33 AS2 */
+	hz935 = 0x5f01,
+	hz941 = 0x5e9a,
+	hz942 = 0x5e88,
+	hz950 = 0x5dfd,
+	hz975 = 0x5c44,
+	hz1000 = 0x5a81,
+	hz1020 = 0x5912,
+	hz1050 = 0x56e2,
+	hz1100 = 0x5320,
+	hz1140 = 0x5007,
+	hz1200 = 0x4b3b,
+	hz1209 = 0x4a80,
+	hz1215 = 0x4a02,
+	hz1250 = 0x471c,
+	hz1300 = 0x42e0,
+	hz1330 = 0x4049,
+	hz1336 = 0x3fc4,
+	hz1366 = 0x3d22,
+	hz1380 = 0x3be4,
+	hz1400 = 0x3a1b,
+	hz1450 = 0x3596,
+	hz1477 = 0x331c,
+	hz1500 = 0x30fb,
+	hz1600 = 0x278d,
+	hz1633 = 0x2462,
+	hz1638 = 0x23e7,
+	hz1645 = 0x233a,
+	hz1750 = 0x18f8,
+	hz1800 = 0x1405,
+	hz1860 = 0xe0b,
+	hz2100 = 0xf5f6,
+	hz2450 = 0xd3b3
+} IXJ_FREQ;
+
+typedef enum {
+	C1 = hz261,
+	CS1 = hz277,
+	D1 = hz293,
+	DS1 = hz311,
+	E1 = hz329,
+	F1 = hz349,
+	FS1 = hz369,
+	G1 = hz392,
+	GS1 = hz415,
+	A1 = hz440,
+	AS1 = hz466,
+	B1 = hz493,
+	C2 = hz523,
+	CS2 = hz554,
+	D2 = hz587,
+	DS2 = hz622,
+	E2 = hz659,
+	F2 = hz698,
+	FS2 = hz739,
+	G2 = hz783,
+	GS2 = hz830,
+	A2 = hz880,
+	AS2 = hz932,
+} IXJ_NOTE;
+
+typedef struct {
+	int tone_index;
+	int freq0;
+	int gain0;
+	int freq1;
+	int gain1;
+} IXJ_TONE;
+
+#define IXJCTL_INIT_TONE		_IOW ('q', 0xC9, IXJ_TONE *)
+
+/******************************************************************************
+*
+* The IXJCTL_TONE_CADENCE ioctl defines tone sequences used for various
+* Call Progress Tones (CPT).  This is accomplished by setting up an array of
+* IXJ_CADENCE_ELEMENT structures that sequentially define the states of
+* the tone sequence.  The tone_on_time and tone_off time are in
+* 250 microsecond intervals.  A pointer to this array is passed to the
+* driver as the ce element of an IXJ_CADENCE structure.  The elements_used
+* must be set to the number of IXJ_CADENCE_ELEMENTS in the array.  The
+* termination variable defines what to do at the end of a cadence, the
+* options are to play the cadence once and stop, to repeat the last
+* element of the cadence indefinatly, or to repeat the entire cadence
+* indefinatly.  The ce variable is a pointer to the array of IXJ_TONE
+* structures.  If the freq0 variable is non-zero, the tone table contents
+* for the tone_index are updated to the frequencies and gains defined.  It
+* should be noted that DTMF tones cannot be reassigned, so if DTMF tone
+* table indexs are used in a cadence the frequency and gain variables will
+* be ignored.
+*
+* If the array elements contain frequency parameters the driver will
+* initialize the needed tone table elements and begin playing the tone,
+* there is no preset limit on the number of elements in the cadence.  If
+* there is more than one frequency used in the cadence, sequential elements
+* of different frequencies MUST use different tone table indexes.  Only one
+* cadence can be played at a time.  It is possible to build complex
+* cadences with multiple frequencies using 2 tone table indexes by
+* alternating between them.
+*
+******************************************************************************/
+
+typedef struct {
+	int index;
+	int tone_on_time;
+	int tone_off_time;
+	int freq0;
+	int gain0;
+	int freq1;
+	int gain1;
+} IXJ_CADENCE_ELEMENT;
+
+typedef enum {
+	PLAY_ONCE,
+	REPEAT_LAST_ELEMENT,
+	REPEAT_ALL
+} IXJ_CADENCE_TERM;
+
+typedef struct {
+	int elements_used;
+	IXJ_CADENCE_TERM termination;
+	IXJ_CADENCE_ELEMENT *ce;
+} IXJ_CADENCE;
+
+#define IXJCTL_TONE_CADENCE		_IOW ('q', 0xCA, IXJ_CADENCE *)
+/******************************************************************************
+*
+* This group of IOCTLs deal with the playback settings of the DSP
+*
+******************************************************************************/
+
+#define IXJCTL_PLAY_CODEC               PHONE_PLAY_CODEC
+#define IXJCTL_PLAY_START               PHONE_PLAY_START
+#define IXJCTL_PLAY_STOP                PHONE_PLAY_STOP
+#define IXJCTL_PLAY_DEPTH		PHONE_PLAY_DEPTH
+#define IXJCTL_PLAY_VOLUME		PHONE_PLAY_VOLUME
+#define IXJCTL_PLAY_LEVEL		PHONE_PLAY_LEVEL
+
+/******************************************************************************
+*
+* This group of IOCTLs deal with the Acoustic Echo Cancellation settings
+* of the DSP
+*
+* Issueing the IXJCTL_AEC_START command with a value of AEC_OFF has the
+* same effect as IXJCTL_AEC_STOP.  This is to simplify slider bar
+* controls.  IXJCTL_AEC_GET_LEVEL returns the current setting of the AEC.
+******************************************************************************/
+#define IXJCTL_AEC_START		_IOW ('q', 0xCB, int)
+#define IXJCTL_AEC_STOP			_IO  ('q', 0xCC)
+#define IXJCTL_AEC_GET_LEVEL		_IO  ('q', 0xCD)
+
+#define AEC_OFF   0
+#define AEC_LOW   1
+#define AEC_MED   2
+#define AEC_HIGH  3
+/******************************************************************************
+*
+* Call Progress Tones, DTMF, etc.
+* IXJCTL_DTMF_OOB determines if dtmf signaling is sent as Out-Of-Band
+* only.  If you pass a 1, dtmf is suppressed from the audio stream.
+* Tone on and off times are in 250 microsecond intervals so
+* ioctl(ixj1, IXJCTL_SET_TONE_ON_TIME, 360);
+* will set the tone on time of board ixj1 to 360 * 250us = 90ms
+* the default values of tone on and off times is 840 or 210ms
+******************************************************************************/
+
+#define IXJCTL_DTMF_READY		PHONE_DTMF_READY
+#define IXJCTL_GET_DTMF                 PHONE_GET_DTMF
+#define IXJCTL_GET_DTMF_ASCII           PHONE_GET_DTMF_ASCII
+#define IXJCTL_DTMF_OOB			PHONE_DTMF_OOB
+#define IXJCTL_EXCEPTION		PHONE_EXCEPTION
+#define IXJCTL_PLAY_TONE		PHONE_PLAY_TONE
+#define IXJCTL_SET_TONE_ON_TIME		PHONE_SET_TONE_ON_TIME
+#define IXJCTL_SET_TONE_OFF_TIME	PHONE_SET_TONE_OFF_TIME
+#define IXJCTL_GET_TONE_ON_TIME		PHONE_GET_TONE_ON_TIME
+#define IXJCTL_GET_TONE_OFF_TIME	PHONE_GET_TONE_OFF_TIME
+#define IXJCTL_GET_TONE_STATE		PHONE_GET_TONE_STATE
+#define IXJCTL_BUSY			PHONE_BUSY
+#define IXJCTL_RINGBACK			PHONE_RINGBACK
+#define IXJCTL_DIALTONE			PHONE_DIALTONE
+#define IXJCTL_CPT_STOP			PHONE_CPT_STOP
+
+/******************************************************************************
+* LineJack specific IOCTLs
+*
+* The lsb 4 bits of the LED argument represent the state of each of the 4
+* LED's on the LineJack
+******************************************************************************/
+
+#define IXJCTL_SET_LED			_IOW ('q', 0xCE, int)
+#define IXJCTL_MIXER			_IOW ('q', 0xCF, int)
+
+/******************************************************************************
+* 
+* The master volume controls use attenuation with 32 levels from 0 to -62dB
+* with steps of 2dB each, the defines should be OR'ed together then sent
+* as the parameter to the mixer command to change the mixer settings.
+* 
+******************************************************************************/
+#define MIXER_MASTER_L		0x0100
+#define MIXER_MASTER_R		0x0200
+#define ATT00DB			0x00
+#define ATT02DB			0x01
+#define ATT04DB			0x02
+#define ATT06DB			0x03
+#define ATT08DB			0x04
+#define ATT10DB			0x05
+#define ATT12DB			0x06
+#define ATT14DB			0x07
+#define ATT16DB			0x08
+#define ATT18DB			0x09
+#define ATT20DB			0x0A
+#define ATT22DB			0x0B
+#define ATT24DB			0x0C
+#define ATT26DB			0x0D
+#define ATT28DB			0x0E
+#define ATT30DB			0x0F
+#define ATT32DB			0x10
+#define ATT34DB			0x11
+#define ATT36DB			0x12
+#define ATT38DB			0x13
+#define ATT40DB			0x14
+#define ATT42DB			0x15
+#define ATT44DB			0x16
+#define ATT46DB			0x17
+#define ATT48DB			0x18
+#define ATT50DB			0x19
+#define ATT52DB			0x1A
+#define ATT54DB			0x1B
+#define ATT56DB			0x1C
+#define ATT58DB			0x1D
+#define ATT60DB			0x1E
+#define ATT62DB			0x1F
+#define MASTER_MUTE		0x80
+
+/******************************************************************************
+* 
+* The input volume controls use gain with 32 levels from +12dB to -50dB
+* with steps of 2dB each, the defines should be OR'ed together then sent
+* as the parameter to the mixer command to change the mixer settings.
+* 
+******************************************************************************/
+#define MIXER_PORT_CD_L		0x0600
+#define MIXER_PORT_CD_R		0x0700
+#define MIXER_PORT_LINE_IN_L	0x0800
+#define MIXER_PORT_LINE_IN_R	0x0900
+#define MIXER_PORT_POTS_REC	0x0C00
+#define MIXER_PORT_MIC		0x0E00
+
+#define GAIN12DB		0x00
+#define GAIN10DB		0x01
+#define GAIN08DB		0x02
+#define GAIN06DB		0x03
+#define GAIN04DB		0x04
+#define GAIN02DB		0x05
+#define GAIN00DB		0x06
+#define GAIN_02DB		0x07
+#define GAIN_04DB		0x08
+#define GAIN_06DB		0x09
+#define GAIN_08DB		0x0A
+#define GAIN_10DB		0x0B
+#define GAIN_12DB		0x0C
+#define GAIN_14DB		0x0D
+#define GAIN_16DB		0x0E
+#define GAIN_18DB		0x0F
+#define GAIN_20DB		0x10
+#define GAIN_22DB		0x11
+#define GAIN_24DB		0x12
+#define GAIN_26DB		0x13
+#define GAIN_28DB		0x14
+#define GAIN_30DB		0x15
+#define GAIN_32DB		0x16
+#define GAIN_34DB		0x17
+#define GAIN_36DB		0x18
+#define GAIN_38DB		0x19
+#define GAIN_40DB		0x1A
+#define GAIN_42DB		0x1B
+#define GAIN_44DB		0x1C
+#define GAIN_46DB		0x1D
+#define GAIN_48DB		0x1E
+#define GAIN_50DB		0x1F
+#define INPUT_MUTE		0x80
+
+/******************************************************************************
+* 
+* The POTS volume control use attenuation with 8 levels from 0dB to -28dB
+* with steps of 4dB each, the defines should be OR'ed together then sent
+* as the parameter to the mixer command to change the mixer settings.
+* 
+******************************************************************************/
+#define MIXER_PORT_POTS_PLAY	0x0F00
+
+#define POTS_ATT_00DB		0x00
+#define POTS_ATT_04DB		0x01
+#define POTS_ATT_08DB		0x02
+#define POTS_ATT_12DB		0x03
+#define POTS_ATT_16DB		0x04
+#define POTS_ATT_20DB		0x05
+#define POTS_ATT_24DB		0x06
+#define POTS_ATT_28DB		0x07
+#define POTS_MUTE		0x80
+
+/******************************************************************************
+* 
+* The DAA controls the interface to the PSTN port.  The driver loads the
+* US coefficients by default, so if you live in a different country you
+* need to load the set for your countries phone system.
+* 
+******************************************************************************/
+#define IXJCTL_DAA_COEFF_SET		_IOW ('q', 0xD0, int)
+
+#define DAA_US 		1	//PITA 8kHz
+#define DAA_UK 		2	//ISAR34 8kHz
+#define DAA_FRANCE 	3	//
+#define DAA_GERMANY	4
+#define DAA_AUSTRALIA	5
+#define DAA_JAPAN	6
+
+/******************************************************************************
+* 
+* Use IXJCTL_PORT to set or query the port the card is set to.  If the
+* argument is set to PORT_QUERY, the return value of the ioctl will
+* indicate which port is currently in use, otherwise it will change the
+* port.
+* 
+******************************************************************************/
+#define IXJCTL_PORT			_IOW ('q', 0xD1, int)
+
+#define PORT_QUERY	0
+#define PORT_POTS	1
+#define PORT_PSTN	2
+#define PORT_SPEAKER	3
+#define PORT_HANDSET	4
+
+#define IXJCTL_PSTN_SET_STATE		PHONE_PSTN_SET_STATE
+#define IXJCTL_PSTN_GET_STATE		PHONE_PSTN_GET_STATE
+
+#define PSTN_ON_HOOK	0
+#define PSTN_RINGING	1
+#define PSTN_OFF_HOOK	2
+#define PSTN_PULSE_DIAL	3
+
+/******************************************************************************
+* 
+* The DAA Analog GAIN sets 2 parameters at one time, the receive gain (AGRR), 
+* and the transmit gain (AGX).  OR together the components and pass them
+* as the parameter to IXJCTL_DAA_AGAIN.  The default setting is both at 0dB.
+* 
+******************************************************************************/
+#define IXJCTL_DAA_AGAIN		_IOW ('q', 0xD2, int)
+
+#define AGRR00DB	0x00	// Analog gain in receive direction 0dB
+#define AGRR3_5DB	0x10	// Analog gain in receive direction 3.5dB
+#define AGRR06DB	0x30	// Analog gain in receive direction 6dB
+
+#define AGX00DB		0x00	// Analog gain in transmit direction 0dB
+#define AGX_6DB		0x04	// Analog gain in transmit direction -6dB
+#define AGX3_5DB	0x08	// Analog gain in transmit direction 3.5dB
+#define AGX_2_5B	0x0C	// Analog gain in transmit direction -2.5dB
+
+#define IXJCTL_PSTN_LINETEST		_IO  ('q', 0xD3)
+
+typedef struct {
+	char month[3];
+	char day[3];
+	char hour[3];
+	char min[3];
+	int numlen;
+	char number[11];
+	int namelen;
+	char name[80];
+} IXJ_CID;
+
+#define IXJCTL_CID			_IOR ('q', 0xD4, IXJ_CID *)
+/******************************************************************************
+* 
+* The wink duration is tunable with this ioctl.  The default wink duration  
+* is 320ms.  You do not need to use this ioctl if you do not require a
+* different wink duration.
+* 
+******************************************************************************/
+#define IXJCTL_WINK_DURATION		PHONE_WINK_DURATION
+
+/******************************************************************************
+* 
+* This ioctl will connect the POTS port to the PSTN port on the LineJACK
+* In order for this to work properly the port selection should be set to
+* the PSTN port with IXJCTL_PORT prior to calling this ioctl.  This will
+* enable conference calls between PSTN callers and network callers.
+* Passing a 1 to this ioctl enables the POTS<->PSTN connection while
+* passing a 0 turns it back off.
+* 
+******************************************************************************/
+#define IXJCTL_POTS_PSTN		_IOW ('q', 0xD5, int)
+
+/******************************************************************************
+*
+* IOCTLs added by request.
+*
+* IXJCTL_HZ sets the value your Linux kernel uses for HZ as defined in
+*           /usr/include/asm/param.h, this determines the fundamental
+*           frequency of the clock ticks on your Linux system.  The kernel
+*           must be rebuilt if you change this value, also all modules you
+*           use (except this one) must be recompiled.  The default value
+*           is 100, and you only need to use this IOCTL if you use some
+*           other value.
+*
+*
+* IXJCTL_RATE sets the number of times per second that the driver polls
+*             the DSP.  This value cannot be larger than HZ.  By
+*             increasing both of these values, you may be able to reduce
+*             latency because the max hang time that can exist between the
+*             driver and the DSP will be reduced.
+*
+******************************************************************************/
+
+#define IXJCTL_HZ                       _IOW ('q', 0xE0, int)
+#define IXJCTL_RATE                     _IOW ('q', 0xE1, int)
+#define IXJCTL_FRAMES_READ		_IOR ('q', 0xE2, unsigned long)
+#define IXJCTL_FRAMES_WRITTEN		_IOR ('q', 0xE3, unsigned long)
+#define IXJCTL_READ_WAIT		_IOR ('q', 0xE4, unsigned long)
+#define IXJCTL_WRITE_WAIT		_IOR ('q', 0xE5, unsigned long)
+#define IXJCTL_DRYBUFFER_READ		_IOR ('q', 0xE6, unsigned long)
+#define IXJCTL_DRYBUFFER_CLEAR		_IO  ('q', 0xE7)
+
+/******************************************************************************
+*
+* The intercom IOCTL's short the output from one card to the input of the
+* other and vice versa (actually done in the DSP read function).  It is only
+* necessary to execute the IOCTL on one card, but it is necessary to have
+* both devices open to be able to detect hook switch changes.  The record
+* codec and rate of each card must match the playback codec and rate of
+* the other card for this to work properly.
+*
+******************************************************************************/
+
+#define IXJCTL_INTERCOM_START 		_IOW ('q', 0xFD, int)
+#define IXJCTL_INTERCOM_STOP  		_IOW ('q', 0xFE, int)
diff -urN linux-2.2.14-pre14/drivers/telephony/Makefile linux-2.2.14-pre15/drivers/telephony/Makefile
--- linux-2.2.14-pre14/drivers/telephony/Makefile	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.2.14-pre15/drivers/telephony/Makefile	2003-08-15 15:09:50.000000000 -0700
@@ -0,0 +1,35 @@
+#
+# Makefile for the kernel miscellaneous drivers.
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+# Note 2! The CFLAGS definitions are now inherited from the
+# parent makes..
+
+SUB_DIRS     := 
+MOD_SUB_DIRS := $(SUB_DIRS)
+ALL_SUB_DIRS := $(SUB_DIRS)
+
+L_TARGET := telephony.a
+MX_OBJS  :=
+M_OBJS  :=
+
+ifeq ($(CONFIG_PHONE),y)
+  L_OBJS += phonedev.o
+else
+  ifeq ($(CONFIG_PARPORT),m)
+    MX_OBJS += phonedev.o
+  endif
+endif
+
+ifeq ($(CONFIG_PHONE_IXJ),y)
+  L_OBJS += ixj.o
+else 
+  ifeq ($(CONFIG_PHONE_IXJ),m)
+    M_OBJS += ixj.o
+  endif
+endif
+
+include $(TOPDIR)/Rules.make
diff -urN linux-2.2.14-pre14/drivers/telephony/phonedev.c linux-2.2.14-pre15/drivers/telephony/phonedev.c
--- linux-2.2.14-pre14/drivers/telephony/phonedev.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.2.14-pre15/drivers/telephony/phonedev.c	2003-08-15 15:09:50.000000000 -0700
@@ -0,0 +1,167 @@
+/*
+ *            Telephony registration for Linux
+ *
+ *              (c) Copyright 1999 Red Hat Software Inc.
+ *
+ *              This program is free software; you can redistribute it and/or
+ *              modify it under the terms of the GNU General Public License
+ *              as published by the Free Software Foundation; either version
+ *              2 of the License, or (at your option) any later version.
+ *
+ * Author:      Alan Cox, <alan@redhat.com>
+ *
+ * Fixes:
+ */
+
+#include <linux/config.h>
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include <linux/phonedev.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+
+#include <linux/kmod.h>
+
+
+#define PHONE_NUM_DEVICES	256
+
+/*
+ *    Active devices 
+ */
+
+static struct phone_device *phone_device[PHONE_NUM_DEVICES];
+
+/*
+ *    Open a phone device.
+ */
+
+static int phone_open(struct inode *inode, struct file *file)
+{
+	unsigned int minor = MINOR(inode->i_rdev);
+	int err;
+	struct phone_device *p;
+
+	if (minor >= PHONE_NUM_DEVICES)
+		return -ENODEV;
+
+	p = phone_device[minor];
+	if (p == NULL) {
+		char modname[32];
+
+		sprintf(modname, "char-major-%d-%d", PHONE_MAJOR, minor);
+		request_module(modname);
+		p = phone_device[minor];
+		if (p == NULL)
+			return -ENODEV;
+	}
+	if (p->open) {
+		err = p->open(p, file);	/* Tell the device it is open */
+		if (err)
+			return err;
+	}
+	file->f_op = p->f_op;
+	return 0;
+}
+
+/*
+ *    Telephony For Linux device drivers request registration here.
+ */
+
+int phone_register_device(struct phone_device *p, int unit)
+{
+	int base;
+	int end;
+	int i;
+
+	base = 0;
+	end = PHONE_NUM_DEVICES - 1;
+
+	if (unit != PHONE_UNIT_ANY) {
+		base = unit;
+		end = unit;
+	}
+	for (i = base; i < end; i++) {
+		if (phone_device[i] == NULL) {
+			phone_device[i] = p;
+			p->minor = i;
+			MOD_INC_USE_COUNT;
+			return 0;
+		}
+	}
+	return -ENFILE;
+}
+
+/*
+ *    Unregister an unused Telephony for linux device
+ */
+
+void phone_unregister_device(struct phone_device *pfd)
+{
+	if (phone_device[pfd->minor] != pfd)
+		panic("phone: bad unregister");
+	phone_device[pfd->minor] = NULL;
+	MOD_DEC_USE_COUNT;
+}
+
+
+static struct file_operations phone_fops =
+{
+	NULL,
+	NULL,
+	NULL,
+	NULL,			/* readdir */
+	NULL,
+	NULL,
+	NULL,
+	phone_open,
+	NULL,			/* flush */
+	NULL
+};
+
+/*
+ *	Board init functions
+ */
+ 
+extern int ixj_init(void);
+
+/*
+ *    Initialise Telephony for linux
+ */
+
+int telephony_init(void)
+{
+	printk(KERN_INFO "Linux telephony interface: v1.00\n");
+	if (register_chrdev(PHONE_MAJOR, "telephony", &phone_fops)) {
+		printk("phonedev: unable to get major %d\n", PHONE_MAJOR);
+		return -EIO;
+	}
+	/*
+	 *    Init kernel installed drivers
+	 */
+#ifdef CONFIG_PHONE_IXJ
+	ixj_init();	 
+#endif
+	return 0;
+}
+
+#ifdef MODULE
+int init_module(void)
+{
+	return telephony_init();
+}
+
+void cleanup_module(void)
+{
+	unregister_chrdev(PHONE_MAJOR, "telephony");
+}
+
+#endif
+
+EXPORT_SYMBOL(phone_register_device);
+EXPORT_SYMBOL(phone_unregister_device);
diff -urN linux-2.2.14-pre14/fs/block_dev.c linux-2.2.14-pre15/fs/block_dev.c
--- linux-2.2.14-pre14/fs/block_dev.c	1999-05-28 09:20:36.000000000 -0700
+++ linux-2.2.14-pre15/fs/block_dev.c	2003-08-15 15:09:50.000000000 -0700
@@ -67,39 +67,50 @@
 			if (chars != blocksize)
 				fn = bread;
 			bh = fn(dev, block, blocksize);
+			if (!bh)
+				return written ? written : -EIO;
+			if (!buffer_uptodate(bh))
+				wait_on_buffer(bh);
 		}
 #else
 		bh = getblk(dev, block, blocksize);
+		if (!bh)
+			return written ? written : -EIO;
 
-		if (chars != blocksize && !buffer_uptodate(bh)) {
-		  if(!filp->f_reada ||
-		     !read_ahead[MAJOR(dev)]) {
-		    /* We do this to force the read of a single buffer */
-		    brelse(bh);
-		    bh = bread(dev,block,blocksize);
-		  } else {
-		    /* Read-ahead before write */
-		    blocks = read_ahead[MAJOR(dev)] / (blocksize >> 9) / 2;
-		    if (block + blocks > size) blocks = size - block;
-		    if (blocks > NBUF) blocks=NBUF;
+		if (!buffer_uptodate(bh))
+		{
+		  if (chars == blocksize)
+		    wait_on_buffer(bh);
+		  else
+		  {
 		    bhlist[0] = bh;
-		    for(i=1; i<blocks; i++){
-		      bhlist[i] = getblk (dev, block+i, blocksize);
-		      if(!bhlist[i]){
-			while(i >= 0) brelse(bhlist[i--]);
-			return written ? written : -EIO;
-		      };
-		    };
+		    if (!filp->f_reada || !read_ahead[MAJOR(dev)]) {
+		      /* We do this to force the read of a single buffer */
+		      blocks = 1;
+		    } else {
+		      /* Read-ahead before write */
+		      blocks = read_ahead[MAJOR(dev)] / (blocksize >> 9) / 2;
+		      if (block + blocks > size) blocks = size - block;
+		      if (blocks > NBUF) blocks=NBUF;
+		      for(i=1; i<blocks; i++)
+		      {
+		        bhlist[i] = getblk (dev, block+i, blocksize);
+		        if (!bhlist[i])
+			{
+			  while(i >= 0) brelse(bhlist[i--]);
+			  return written ? written : -EIO;
+		        }
+		      }
+		    }
 		    ll_rw_block(READ, blocks, bhlist);
 		    for(i=1; i<blocks; i++) brelse(bhlist[i]);
 		    wait_on_buffer(bh);
-		      
+		    if (!buffer_uptodate(bh))
+			  return written ? written : -EIO;
 		  };
 		};
 #endif
 		block++;
-		if (!bh)
-			return written ? written : -EIO;
 		p = offset + bh->b_data;
 		offset = 0;
 		*ppos += chars;
diff -urN linux-2.2.14-pre14/fs/super.c linux-2.2.14-pre15/fs/super.c
--- linux-2.2.14-pre14/fs/super.c	2003-08-15 15:09:49.000000000 -0700
+++ linux-2.2.14-pre15/fs/super.c	2003-08-15 15:09:50.000000000 -0700
@@ -983,7 +983,6 @@
 	if (!data)
 		return 0;
 
-#if 0
 	vma = find_vma(current->mm, (unsigned long) data);
 	if (!vma || (unsigned long) data < vma->vm_start)
 		return -EFAULT;
@@ -992,13 +991,13 @@
 	i = vma->vm_end - (unsigned long) data;
 	if (PAGE_SIZE <= (unsigned long) i)
 		i = PAGE_SIZE-1;
-#else
-	i = PAGE_SIZE;		
-#endif		
-	if (!(page = get_free_page(GFP_KERNEL))) {
+	if (!(page = __get_free_page(GFP_KERNEL))) {
 		return -ENOMEM;
 	}
-	copy_from_user((void *) page,data,i);
+	if (copy_from_user((void *) page,data,i)) {
+		free_page(page); 
+		return -EFAULT;
+	}
 	*where = page;
 	return 0;
 }
diff -urN linux-2.2.14-pre14/include/linux/phonedev.h linux-2.2.14-pre15/include/linux/phonedev.h
--- linux-2.2.14-pre14/include/linux/phonedev.h	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.2.14-pre15/include/linux/phonedev.h	2003-08-15 15:09:50.000000000 -0700
@@ -0,0 +1,26 @@
+#ifndef __LINUX_PHONEDEV_H
+#define __LINUX_PHONEDEV_H
+
+#include <linux/types.h>
+#include <linux/version.h>
+
+#ifdef __KERNEL__
+
+#include <linux/poll.h>
+
+struct phone_device {
+	struct phone_device *next;
+	struct file_operations *f_op;
+	int (*open) (struct phone_device *, struct file *);
+	int board;		/* Device private index */
+	int minor;
+};
+
+extern int phonedev_init(void);
+#define PHONE_MAJOR	100
+extern int phone_register_device(struct phone_device *, int unit);
+#define PHONE_UNIT_ANY	-1
+extern void phone_unregister_device(struct phone_device *);
+
+#endif
+#endif
diff -urN linux-2.2.14-pre14/include/linux/telephony.h linux-2.2.14-pre15/include/linux/telephony.h
--- linux-2.2.14-pre14/include/linux/telephony.h	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.2.14-pre15/include/linux/telephony.h	2003-08-15 15:09:50.000000000 -0700
@@ -0,0 +1,200 @@
+/*
+ *              telephony.h
+ *
+ *              Basic Linux Telephony Interface
+ *
+ *              (c) Copyright 1999 Quicknet Technologies, 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.
+ *
+ * Authors:       Ed Okerson, <eokerson@quicknet.net>
+ *                Greg Herlein, <gherlein@quicknet.net>
+ *
+ * Contributors:  Alan Cox, <acox@redhat.com>
+ *                David Erhart, <derhart@quicknet.net>
+ *
+ * Version:       0.1.0 - December 19, 1999
+ *
+ * Fixes:
+ */
+
+#ifndef TELEPHONY_H
+#define TELEPHONY_H
+
+/* vendor identification numbers */
+#define PHONE_VENDOR_IXJ          1
+#define PHONE_VENDOR_QUICKNET     PHONE_IXJ
+#define PHONE_VENDOR_VOICETRONIX  2
+#define PHONE_VENDOR_ACULAB       3
+#define PHONE_VENDOR_DIGI         4
+#define PHONE_VENDOR_FRANKLIN     5
+
+/******************************************************************************
+ *  Vendor Summary Information Area
+ *
+ *  Quicknet Technologies, Inc. - makes low density analog telephony cards
+ *    with audio compression, POTS and PSTN interfaces (www.quicknet.net)
+ *
+ *  (other vendors following this API shuld add a short description of
+ *  the telephony products they support under Linux)
+ *
+ *****************************************************************************/
+
+ 
+/******************************************************************************
+*
+* The capabilities ioctls can inform you of the capabilities of each phone
+* device installed in your system.  The PHONECTL_CAPABILITIES ioctl
+* returns an integer value indicating the number of capabilities the   
+* device has.  The PHONECTL_CAPABILITIES_LIST will fill an array of 
+* capability structs with all of it's capabilities.  The
+* PHONECTL_CAPABILITIES_CHECK takes a single capability struct and returns
+* a TRUE if the device has that capability, otherwise it returns false.
+* 
+******************************************************************************/
+typedef enum {
+	vendor = 0,
+	device,
+	port,
+	codec,
+	dsp
+} phone_cap;
+
+struct phone_capability {
+	char desc[80];
+	phone_cap captype;
+	int cap;
+	int handle;
+};
+
+typedef enum {
+	pots = 0,
+	pstn,
+	handset,
+	speaker
+} phone_ports;
+
+#define PHONE_CAPABILITIES              _IO  ('q', 0x80)
+#define PHONE_CAPABILITIES_LIST         _IOR ('q', 0x81, struct phone_capability *)
+#define PHONE_CAPABILITIES_CHECK        _IOW ('q', 0x82, struct phone_capability *)
+
+#define PHONE_RING			_IO  ('q', 0x83)
+#define PHONE_HOOKSTATE			_IO  ('q', 0x84)
+#define PHONE_MAXRINGS			_IOW ('q', 0x85, char)
+#define PHONE_RING_CADENCE		_IOW ('q', 0x86, short)
+#define PHONE_RING_START		_IO  ('q', 0x87)
+#define PHONE_RING_STOP			_IO  ('q', 0x88)
+
+#define USA_RING_CADENCE	 0xC0C0
+
+#define PHONE_REC_CODEC			_IOW ('q', 0x89, int)
+#define PHONE_REC_START			_IO  ('q', 0x8A)
+#define PHONE_REC_STOP			_IO  ('q', 0x8B)
+#define PHONE_REC_DEPTH			_IOW ('q', 0x8C, int)
+#define PHONE_FRAME			_IOW ('q', 0x8D, int)
+#define PHONE_REC_VOLUME		_IOW ('q', 0x8E, int)
+#define PHONE_REC_LEVEL			_IO  ('q', 0x8F)
+
+#define PHONE_PLAY_CODEC		_IOW ('q', 0x90, int)
+#define PHONE_PLAY_START		_IO  ('q', 0x91)
+#define PHONE_PLAY_STOP			_IO  ('q', 0x92)
+#define PHONE_PLAY_DEPTH		_IOW ('q', 0x93, int)
+#define PHONE_PLAY_VOLUME		_IOW ('q', 0x94, int)
+#define PHONE_PLAY_LEVEL		_IO  ('q', 0x95)
+#define PHONE_DTMF_READY		_IOR ('q', 0x96, int)
+#define PHONE_GET_DTMF			_IOR ('q', 0x97, int)
+#define PHONE_GET_DTMF_ASCII		_IOR ('q', 0x98, int)
+#define PHONE_DTMF_OOB			_IOW ('q', 0x99, int)
+#define PHONE_EXCEPTION			_IOR ('q', 0x9A, int)
+#define PHONE_PLAY_TONE			_IOW ('q', 0x9B, char)
+#define PHONE_SET_TONE_ON_TIME		_IOW ('q', 0x9C, int)
+#define PHONE_SET_TONE_OFF_TIME		_IOW ('q', 0x9D, int)
+#define PHONE_GET_TONE_ON_TIME		_IO  ('q', 0x9E)
+#define PHONE_GET_TONE_OFF_TIME		_IO  ('q', 0x9F)
+#define PHONE_GET_TONE_STATE		_IO  ('q', 0xA0)
+#define PHONE_BUSY			_IO  ('q', 0xA1)
+#define PHONE_RINGBACK			_IO  ('q', 0xA2)
+#define PHONE_DIALTONE			_IO  ('q', 0xA3)
+#define PHONE_CPT_STOP			_IO  ('q', 0xA4)
+
+#define PHONE_PSTN_SET_STATE		_IOW ('q', 0xA4, int)
+#define PHONE_PSTN_GET_STATE		_IO  ('q', 0xA5)
+
+#define PSTN_ON_HOOK		0
+#define PSTN_RINGING		1
+#define PSTN_OFF_HOOK		2
+#define PSTN_PULSE_DIAL		3
+
+/******************************************************************************
+* 
+* The wink duration is tunable with this ioctl.  The default wink duration  
+* is 320ms.  You do not need to use this ioctl if you do not require a
+* different wink duration.
+* 
+******************************************************************************/
+#define PHONE_WINK_DURATION		_IOW ('q', 0xA6, int)
+
+
+/******************************************************************************
+* 
+*  Codec Definitions
+* 
+******************************************************************************/
+typedef enum {
+	G723_63 = 1,
+	G723_53 = 2,
+	TS85 = 3,
+	TS48 = 4,
+	TS41 = 5,
+	G728 = 6,
+	G729 = 7,
+	ULAW = 8,
+	ALAW = 9,
+	LINEAR16 = 10,
+	LINEAR8 = 11,
+	WSS = 12
+} phone_codec;
+
+/******************************************************************************
+*
+* The exception structure allows us to multiplex multiple events onto the
+* select() exception set.  If any of these flags are set select() will
+* return with a positive indication on the exception set.  The dtmf_ready
+* bit indicates if there is data waiting in the DTMF buffer.  The
+* hookstate bit is set if there is a change in hookstate status, it does not
+* indicate the current state of the hookswitch.  The pstn_ring bit
+* indicates that the DAA on a LineJACK card has detected ring voltage on
+* the PSTN port.  The caller_id bit indicates that caller_id data has been
+* recieved and is available.  The pstn_wink bit indicates that the DAA on
+* the LineJACK has recieved a wink from the telco switch.  The f0, f1, f2
+* and f3 bits indicate that the filter has been triggered by detecting the
+* frequency programmed into that filter.
+*
+* The remaining bits should be set to zero. They will become defined over time
+* for other interface cards and their needs.
+*
+******************************************************************************/
+struct phone_except
+{
+	unsigned int dtmf_ready:1;
+	unsigned int hookstate:1;
+	unsigned int pstn_ring:1;
+	unsigned int caller_id:1;
+	unsigned int pstn_wink:1;
+	unsigned int f0:1;
+	unsigned int f1:1;
+	unsigned int f2:1;
+	unsigned int f3:1;
+	unsigned int reserved:23;
+};
+
+union telephony_exception {
+	struct phone_except bits;
+	unsigned int bytes;
+};
+
+
+#endif				/* TELEPHONY_H */
diff -urN linux-2.2.14-pre14/Makefile linux-2.2.14-pre15/Makefile
--- linux-2.2.14-pre14/Makefile	2003-08-15 15:09:48.000000000 -0700
+++ linux-2.2.14-pre15/Makefile	2003-08-15 15:09:49.000000000 -0700
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 14
-EXTRAVERSION = pre14
+EXTRAVERSION = pre15
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
@@ -202,6 +202,10 @@
 DRIVERS := $(DRIVERS) drivers/net/irda/irda_drivers.a
 endif
 
+ifeq ($(CONFIG_PHONE),y)
+DRIVERS := $(DRIVERS) drivers/telephony/telephony.a
+endif
+
 include arch/$(ARCH)/Makefile
 
 .S.s:
