#
# Copyright (c) 2003 Linuxant inc.
# Copyright (c) 2001-2003 Conexant Systems, Inc.
#
# NOTE: The use and distribution of this software is governed by the terms in
# the file LICENSE, which is included in the package. You must read this and
# agree to these terms before using or distributing this software.
#

# set _target_kernel to generic if it wasn't defined on the command-line
%if %{expand:%{?_target_kernel:0}%{!?_target_kernel:1}}
%define _target_kernel generic
%endif

%if "%{_target_kernel}" == "generic"
%define ver      5.03.27lnxtbeta03042700
%define rel      1
%define automrecomp 1
%else
%define ver      5.03.27lnxtbeta03042700k%(eval echo %{_target_kernel} | sed 's/-/_/g')
%define rel      1%{_target_distro}
%define automrecomp 0
%endif

%define scr_support 0
%define dmp_support 0

# Note that this is NOT a relocatable package

# Even though newer versions of RPM provide definitions for these,
# we must still accomodate the older ones
%define prefix   /usr
%define etcdir   /etc
%define libdir   %{prefix}/lib
%define sbindir  %{prefix}/sbin
%define bindir   %{prefix}/bin

Summary:   Conexant HSF softmodem driver for Linux
Name:      hsflinmodem
ExclusiveOS: Linux
%if "%{_target_kernel}" == "generic"
ExclusiveArch: athlon i686 i586 i386
%else
ExclusiveArch: %{_target_cpu}
%endif
Version:   %ver
Release:   %rel
Vendor:	   Linuxant
Copyright: Copyright (c) 2003 Linuxant inc. All rights reserved.
Group:     System Environment/Kernel
Source:    hsflinmodem-5.03.27lnxtbeta03042700.tar.gz
Source2:   100498D_RM_HxF_Released.pdf
URL:       http://www.linuxant.com/drivers/hsf
BuildRoot: %{_tmppath}/hsflinmodem-%{PACKAGE_VERSION}-root
Packager:  Linuxant
Requires:  pciutils
Autoreq:   0

%if "%{_target_kernel}" == "generic"
%package doc
Group:     Documentation
Summary:   Documentation for Conexant HSF softmodems
%endif

%description
Conexant HSF softmodem driver for Linux

Copyright (c) 2003 Linuxant inc.
Copyright (c) 2001-2003 Conexant Systems, Inc.

1.   Permitted use. Redistribution and use in source and binary forms,
without modification, are permitted under the terms set forth herein.

2.   Disclaimer of Warranties. LINUXANT, ITS SUPPLIERS, AND OTHER CONTRIBUTORS
MAKE NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.
IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTIES OF ANY KIND.
LINUXANT AND OTHER CONTRIBUTORS DISCLAIMS ALL WARRANTIES WITH REGARD
TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE, GOOD TITLE AND AGAINST INFRINGEMENT.

This software has not been formally tested, and there is no guarantee that
it is free of errors including, but not limited to, bugs, defects,
interrupted operation, or unexpected results. Any use of this software is
at user's own risk.

3.   No Liability.

(a) Linuxant, its suppliers, or contributors shall not be responsible for
any loss or damage to users, customers, or any third parties for any reason
whatsoever, and LINUXANT, ITS SUPPLIERS OR CONTRIBUTORS SHALL NOT BE LIABLE
FOR ANY ACTUAL, DIRECT, INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL, OR
CONSEQUENTIAL (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED, WHETHER IN CONTRACT, STRICT OR OTHER LEGAL THEORY OF
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.

(b) User agrees to hold Linuxant, its suppliers, and contributors harmless
from any liability, loss, cost, damage or expense, including attorney's fees,
as a result of any claims which may be made by any person, including
but not limited to User, its agents and employees, its customers, or
any third parties that arise out of or result from the manufacture,
delivery, actual or alleged ownership, performance, use, operation
or possession of the software furnished hereunder, whether such claims
are based on negligence, breach of contract, absolute liability or any
other legal theory.

4.   Notices. User hereby agrees not to remove, alter or destroy any
copyright, trademark, credits, other proprietary notices or confidential
legends placed upon, contained within or associated with the Software,
and shall include all such unaltered copyright, trademark, credits,
other proprietary notices or confidential legends on or in every copy of
the Software.

5.   Reverse-engineering. User hereby agrees not to reverse engineer,
decompile, or disassemble the portions of this software provided solely
in object form, nor attempt in any manner to obtain their source-code.

6.   Redistribution. Redistribution of this software is permitted only
for non-beta, officially released versions. Redistribution of versions
marked "beta" or "lnxtbeta" requires explicit written approval from
Linuxant.

%if "%{_target_kernel}" == "generic"
%description doc
This package contains the documentation for Conexant HSF softmodems.
%endif

%prep
%setup -q -n hsflinmodem-5.03.27lnxtbeta03042700

%build
make --quiet --no-print-directory all
%if "%{_target_kernel}" == "generic"

cp %{SOURCE2} .

%else

%if "%{_target_distro}" == "rh"
(
	if cd modules; then
		make --quiet --no-print-directory KERNELSRC=%{_distro_kernels}/%{_target_distro}/linux-%{_target_kernel} DISTRO_CFLAGS="-D__BOOT_KERNEL_H_ -D__BOOT_KERNEL_ENTERPRISE=0 -D__BOOT_KERNEL_SMP=0 -D__BOOT_KERNEL_UP=1 -D__MODULE_KERNEL_%{_target_cpu}=1" HSF_MODS_DIR=binaries/%{_target_cpu}/%{_target_distro}/linux-%{_target_kernel} clean all modules_install || exit $?
	fi
) || exit $?
%endif

%if "%{_target_distro}" == "mdk"
(
	if cd modules; then
		make --quiet --no-print-directory KERNELSRC=%{_distro_kernels}/%{_target_distro}/linux-%{_target_kernel} DISTRO_CFLAGS="-D__BOOT_KERNEL_H_ -D__BOOT_KERNEL_ENTERPRISE=0 -D__BOOT_KERNEL_SMP=0 -D__BOOT_KERNEL_UP=1 -D__MODULE_KERNEL_%{_target_cpu}=1" HSF_MODS_DIR=binaries/%{_target_cpu}/%{_target_distro}/linux-%{_target_kernel} clean all modules_install || exit $?
		ln -s i586 binaries/i686
		ln -s i586 binaries/athlon
	fi
) || exit $?
%endif

%if "%{_target_distro}" == "suse"
(
	if cd modules; then
		make --quiet --no-print-directory KERNELSRC=%{_distro_kernels}/%{_target_distro}/linux-%{_target_kernel} HSF_MODS_DIR=binaries/%{_target_cpu}/%{_target_distro}/linux-%{_target_kernel} clean all modules_install || exit $?
%if "%{_target_cpu}" == "i586"
		for a in i686 athlon; do
%else
		for a in i386 i486 i586 i686 athlon; do
%endif
			[ -e binaries/$a ] || ln -s %{_target_cpu} binaries/$a
		done
	fi
) || exit $?
%endif

%endif

%install
rm -rf $RPM_BUILD_ROOT

make --quiet --no-print-directory ROOT=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

%files

%defattr(0555, root, root, 755)

%{sbindir}/hsfconfig
%{sbindir}/hsfinf2bin
%{sbindir}/hsffirm2bin
%{sbindir}/hsfstop

%if %{scr_support}
%{sbindir}/hsfdbgsrv
%{bindir}/qtmodemon
%endif
%if %{dmp_support}
%{sbindir}/hsfdmpsrv
%endif

%defattr(0444, root, root, 755)
%dir %{etcdir}/hsf
%{etcdir}/hsf/*.hex
%dir %{etcdir}/hsf/inf
#%config(missingok) %{etcdir}/hsf/config
%config %{etcdir}/hsf/inf/*.inf
%dir %{libdir}/hsf
%doc %{libdir}/hsf/LICENSE
%dir %{libdir}/hsf/modules
%doc %{libdir}/hsf/modules/COPYING
%{libdir}/hsf/modules/binaries

%if %{automrecomp}
%config %{libdir}/hsf/config.mak
%{libdir}/hsf/imported
%attr(755, root, root) %{libdir}/hsf/modules/*.sh
%{libdir}/hsf/modules/[mM]akefile
%{libdir}/hsf/modules/common.mak
%{libdir}/hsf/modules/*.c
%{libdir}/hsf/modules/*.h
%dir %{libdir}/hsf/modules/osspec
%{libdir}/hsf/modules/osspec/[mM]akefile
%{libdir}/hsf/modules/osspec/*.c
%dir %{libdir}/hsf/modules/osspec/include
%{libdir}/hsf/modules/osspec/include/*.h
%endif

%doc BUGS CHANGES CREDITS FAQ INSTALL LICENSE README

%pre
if [ -e "%{libdir}/hsf" ]; then
	echo "Removing old %{libdir}/hsf"
	rm -rf "%{libdir}/hsf"
else
	exit 0
fi

%post
%if ! %{automrecomp}
HSF_AUTOCONFIG=true
%endif
if [ -n "${HSF_AUTOCONFIG}" -a -z "${HSF_NOAUTOCONFIG}" ]; then
	%{sbindir}/hsfconfig --auto
	exit $?
else
	echo "To complete the installation and configuration of your HSF modem,"
	echo "please run \"hsfconfig\" (or \"%{sbindir}/hsfconfig\")"
	exit 0
fi

%preun
if [ -z "${HSF_NOAUTOCONFIG}" ]; then
	%{sbindir}/hsfconfig --remove
else
	exit 0
fi

%if "%{_target_kernel}" == "generic"
%files doc
%doc *.pdf
%endif

# This must be last since the file CHANGES is automatically appended
%changelog

* Sun Apr 27 2003 Marc Boucher
	- Released hsflinmodem-5.03.27lnxtbeta03042700.

* Sun Apr 27 2003 Marc Boucher
	- makefile, hsflinmodem.spec.in: changes to build packages for newer
	SuSE versions with i586 arch and athlon kernels.
	- modules/kernelcompiler.sh: fixed SuSE 8.2 issue.
	- scripts/hsfconfig.in: improved dump_diagnostics() and added --noprobe
    option.
	- scripts/hsfconfig.in: use ${AWK} (gawk if present) instead of awk.
	- scripts/hsfconfig.in: fix link problem in create_temp_kernel_tree().
	- FAQ: updated.

* Fri Apr 18 2003 Marc Boucher
	- modules/serial_hsf.c: hsf_get_lastcallstatus(): use length and check
	offset.
	- imported/hsfengine.O: increased buffer size for AT#UG (lastcallstatus).

* Wed Apr 16 2003 Marc Boucher
	- Released hsflinmodem-5.03.27lnxtbeta03041600.

* Wed Apr 16 2003 Marc Boucher
	- FAQ: major update.
	- makefile: added rule to sign rpm packages.
	- inf/linux_intel_smartmc.inf: added 8086:24C6 device (thanks to
	Gianpaolo Cugola who reported successfully using this inf
	file with his Dell Latitude D600)
	- inf/linux_hsfi.inf: added 14F1:2702 device.

* Wed Apr 16 2003 Marc Boucher
	- Added pre-built binary packages for the following
	distributions/kernel versions:
		Mandrake 9.1 linux-2.4.21-0.13mdk
		Mandrake 9.0 linux-2.4.19-32mdk
		RedHat 9 linux-2.4.20-8 and -9
		RedHat 8.0 linux-2.4.18-27.8.0
		SuSE 8.2 2.4.20-4GB
	- modules/kernelcompiler.sh: updated.

* Wed Apr 16 2003 Marc Boucher
	- modules/osspec/ostime.c: compatibility changes for
	RedHat 9 and newer 2.5 kernels.
	- modules/osspec/ostime.c: fixed important race in mdmthrd().

* Wed Apr 16 2003 Marc Boucher
	- Now officially maintained and distributed by Linuxant.

* Wed Dec 26 2002 Marc Boucher
	- Released hsflinmodem-5.03.27mbsibeta02122600.

* Wed Dec 26 2002 Marc Boucher
	- Merged workarounds for various V.42 problems.
	- Merged new improved Conexant modem code (v5.03.27).
	- Added support for configurable buffer switch delays.

* Wed Dec 25 2002 Marc Boucher
	- Released hsflinmodem-5.03.03mbsibeta02122500.

* Wed Dec 25 2002 Marc Boucher
	- Resolved hangs/disconnects after a few retrains.
	- Simplified RTMgr to eliminate ordering issues affecting
	flow control status events.
	- Fixed AT%E0 command to disable retrains/renegs.
	- Output trace error messages.

* Tue Dec 17 2002 Marc Boucher
	- makefile: added Mandrake 9.0 linux-2.4.19-19mdk kernel.
	- makefile: added RedHat 2.4.18-19.7.x and 2.4.18-19.8.0 kernels.

* Mon Dec 09 2002 Marc Boucher
	- inf/linux_hsf.inf: added 127A:2004 (thanks to Paul Lebeyka).

* Thu Nov 14 2002 Marc Boucher
	- modules/osspec/ostime.c: emulate nested critical sections to
	hopefully fix hangs on SMP.

* Sun Nov 03 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02110301.

* Sun Nov 03 2002 Marc Boucher
	- modules/kernelcompiler.sh: use gcc 3 to build modules for
	SuSE's 2.4.19-4GB kernel.

* Sun Nov 03 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02110300.

* Sun Nov 03 2002 Marc Boucher
	- makefile: added RedHat 2.4.18-17.7.x and 2.4.18-17.8.0 kernels.
	- makefile: added SuSE 2.4.19-4GB kernel.
	- modules/kernelcompiler.sh: use gcc 3 to build modules for
	RedHat's 2.4.18-17.8.0 kernel.
	- scripts/hsfconfig.in: put module configuration in /etc/modules.d and
	run update-modules if present (for gentoo).
	- modules/serial_hsf.c: properly test COMCTRL_MONITOR_POUND_UG_SUPPORTED.

* Tue Oct 29 2002 Marc Boucher
	- Limited printing of MC97 vendor IDs.

* Fri Oct 11 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02101001.

* Fri Oct 11 2002 Marc Boucher
	- modules/kernelcompiler.sh: use gcc 3 to build modules for
	RedHat's 2.4.18-14 kernel.

* Thu Oct 10 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02101000.

* Thu Oct 10 2002 Marc Boucher
	- makefile: added RedHat 8.0 linux-2.4.18-14 kernel.

* Mon Sep 30 2002 Marc Boucher
	- inf/: Changed INTCODE for SWEDEN from 009 to 00.
	(Thanks to Anders Helmersson)

* Mon Sep 30 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02093000.

* Mon Sep 30 2002 Marc Boucher
	- imported/hsfengine.O: fixed RTMgr race condition causing
	flow control to hang when a lot of data is uploaded.
	- makefile: added Mandrake 9.0 linux-2.4.19-16mdk kernel and
	removed obsolete SuSE 2.4.4-4GB kernel.

* Sun Sep 29 2002 Marc Boucher
	- makefile: tardist: changed way tar.gz files are generated to
	avoid gzip "decompression OK, trailing garbage ignored" messages.
	- modules/serial_hsf.c: Added /proc/driver/hsf/0/lastcallstatus and
	loglastcallstatus parameter, which when set to a non-zero value will
	make the driver automatically log the last call status (AT#UG) info.
	- INSTALL: document loglastcallstatus feature.

* Mon Sep 23 2002 Marc Boucher
	- modules/osspec/ostime.c: minor adjustments for 2.5 compatibility.
	- modules/serial_core.c: uart_register_driver(): set driver_name
	to drv->owner->name for proper /proc/tty/driver/ naming;
	renamed HSFSERIAL_INCLUDE_CORE to CNXTSERIAL_INCLUDE_CORE throughout.
	- Fixed potential crash upon MC97 driver initialization failure.
	- imported/makeflags.mak: removed problematic COMPILATION_FLAGS.
	- inf/linux_*_smartmc.inf: set additional HwData bit to improve
	handshaking reliability.
	- modules/kernelcompiler.sh: added gcc-2.96 (for Mandrake 9) and
	RPM_BUILD_ROOT support.

* Fri Sep 06 2002 Marc Boucher
	- inf/linux_ali_smartmc.inf, README: added ALI 10B9:5453 MC97
	controller.

* Thu Sep 05 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02090500.

* Thu Sep 05 2002 Marc Boucher
	- Added initial support for ALI MC97 controller (10B9:5457)
	with Conexant AC-Link modems. Thanks to HP for supporting this effort!
	- README, CREDITS: updated.

* Thu Sep 05 2002 Marc Boucher
	- imported/hsfengine.O: fixed another StatMgr bug.

* Fri Aug 30 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02083000.

* Fri Aug 30 2002 Marc Boucher
	- FAQ: updated.
	- modules/osspec/include/oscompat.h: added check for CONFIG_PREEMPT.
	- modules/osspec/ostime.c: fixed more potential race conditions and
	thread termination problems.
	- makefile: added Mandrake 2.4.18-8.1mdk kernel.
	- Stack checker is now disabled by default.

* Sun Aug 25 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02082500.

* Sun Aug 25 2002 Marc Boucher
	- modules/osspec/include/oscompat.h: added attribute used
	to stack_overflow() to prevent compiler from optimizing it out.
	- modules/osspec/ostime.c: mdmthrd startup/shutdown improvements.

* Sat Aug 24 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02082400.

* Sat Aug 24 2002 Marc Boucher
	- makefile: added RedHat 2.4.18-10 kernel.
	- modules/osspec/ostime.c: removed modem_task_fpu_begin/end() to
	resolve floating point problem in kernel thread which caused
	"MemMgr_Alloc:: failed, ReqSize == 0" errors on some machines.

* Fri Aug 23 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02082300.

* Fri Aug 23 2002 Marc Boucher
	- modules/osspec/include/oscompat.h: added kernel stack checker.
	- modules/osspec/ostime.c: fixed potential race condition
	in OSCriticalSectionAcquire().
	- imported/hsfengine.O: fixed StatMgr/MemMgr issue causing
	memory problems after 9-10 connections.

* Tue Aug 20 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02082000.

* Tue Aug 20 2002 Marc Boucher
	- modules/osspec/osmemory.c: emit error message upon vmalloc()
	or kmalloc() failure.
	- imported/hsfengine.O: memory manager should no longer
	allocate/free os memory while holding locks.

* Mon Aug 19 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02081900.

* Mon Aug 19 2002 Marc Boucher
	- Eliminated OSCallOnMyStack() which was causing major crashes
	due to get_current() expecting that a task_struct be present
	at (esp & ~8191). Let's just hope that we will never exhaust
	the kernel (interrupt) stack..
	- Added modules/kernelcompiler.sh, a small script which tries
	to guess which compiler should be used to build kernel modules.
	- modules/common.mak: use kernelcompiler.sh to determine default CC
	- modules/common.mak, INSTALL: added notes about KERNELSRC for
	Debian 3.0 users.
	- inf/linux_hsf.inf: added 14F1:2F10, 14F1:2F11, 14F1:2F13 (USR OEM).

* Tue Jul 23 2002 Marc Boucher
	- imported/hsfengine.O: asm fixes for gcc-3.2.
	- README: added notice that preemptible kernels are not
	supported (for now).

* Sun Jul 21 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02072100.

* Sun Jul 21 2002 Marc Boucher
	- makefile: added RedHat 2.4.9-34 and 2.4.18-5 kernels.
	- Updated BUGS file.

* Sat Jul 20 2002 Marc Boucher
	- imported/hsfengine.O: important workaround for tricky StatMgr issue
	causing sporadic memory corruption!
	- modules/osspec/include/oscompat.h: added OSContextAllowsSleeping(),
	which is false if we are in interrupt context or holding any lock.
	- modules/osspec/ostime.c: implemented dedicated kernel thread,
	replacing use of tq_scheduler and schedule_task().
	- modules/osspec/ostime.c: TimerThreadFunction(): enclose
	pTimeOutInstance->pTimeOutCallBack() in modem_task_fpu_begin/end().
	- modules/osspec/ostime.c: rewrote OSCallOnMyStack().
	- modules/osspec/ostime.c: use cmpxchg() as OsAtomicCompareAndSwap()
	if available.
	- modules/osspec/ostime.c: added OsAtomicIncrement() and
	OsAtomicDecrement().
	- modules/osspec/ostime.c: OsSleep(): ensure OSContextAllowsSleeping().
	- modules/osspec/osmemory.c: OsHeapAllocate(), OsMemDMAAllocate(): use
	GFP_ATOMIC if not OSContextAllowsSleeping().
	- modules/makefile: libosspec.a for proper dependencies.
	- inf/linux_hsfi.inf: use new official (Conexant) generic relays.

* Thu Jul 11 2002 Marc Boucher
	- inf/linux_hsf.inf: added 14F1:2F12 (3COM/USR model 3094-3095).
	- config.mak: use HSFETCDIR for HSFBININF_FILE and HSFFIRMWR_FILE.
	(Thanks to Fabrice LABORIE)

* Tue Jun 25 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02062500.

* Tue Jun 25 2002 Marc Boucher
	- modules/osspec/include/oscompat.h: get rid of non-standard min/max
	macros under 2.4.9.
	- inf/linux_hsfi.inf: backout generic RELAYS for now.
	- Minor frequency calculation tweak in VIA MC97 controller driver.
	- modules/osspec/osdebug.c: OsErrorVPrintf() now uses default printk
	level.

* Tue Jun 18 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02061800.

* Tue Jun 18 2002 Marc Boucher
	- Fixed frequency calculation issue in VIA MC97 controller driver.
	- Added one-time print of MC97 vendor IDs.
	- OSTermPowerManagement(): use pm_unregister() under 2.4,
	pm_unregister_all() only once under 2.2.

* Mon Jun 17 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L3mbsibeta02061700.

* Sun Jun 16 2002 Marc Boucher
	- Added preliminary power-management support.
	- Improved hardware interrupt initialization.
	- modules/osspec/ostime.c: OsSleep() and MSECS_TO_TICKS() tweaking.

* Tue Jun 11 2002 Marc Boucher
	- makefile, hsflinmodem.spec.in: don't include big pdf file in tar pkgs.

* Mon Jun 10 2002 Marc Boucher
	- makefile, hsflinmodem.spec.in: better error propagation for RPM builds.

* Sun Jun 02 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L2mbsibeta02060200.

* Sun Jun 02 2002 Marc Boucher
	- Restructured packaging once again to improve consistency with linux
	distribution practices and further reduce space consumption.
	- Merged latest VIA MC97 controller code, fixing RING detection
	on some newer AC-link modems.

* Sat Jun 01 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L2mbsibeta02060100.

* Sat Jun 01 2002 Marc Boucher
	- modules/serial_hsf.c: hsf_tx_ready() should ignore hsf_evt_txempty
	for now.
	- modules/osspec/osstdio.c: various enhancements to OsFOpen().

* Fri May 31 2002 Marc Boucher
	- Added initial support for VIA MC97 controller (1106:3068)
	with Conexant AC-Link modems.
	- Fixed delay calculation issue affecting Intel MC97 driver.
	- modules/osspec/linuxres.c: added LinuxPci{Read,Write}Config{w,b}
	- modules/osspec/osmemory.c: OsMemDMAAllocate() should safely
	ignore a NULL pMemHandle.
	- Removed extraneous prefixes from T.31 fax command responses.

* Tue May 28 2002 Marc Boucher
	- modules/serial_core.c: replaced MINOR() with minor() for 2.5.x and
	added missing spin_lock_init(&info->lock) to uart_get().
	- modules/osspec/include/oscompat.h: ensure minor() is defined.

* Sun May 26 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L2mbsibeta02052600.

* Sun May 26 2002 Marc Boucher
	- Restructured distribution-specific packaging to include
	only needed kernel module binaries without unnecessary source.
	This reduces package sizes and download times. Only the generic
	packages now contain source code providing hsfconfig the ability
	to re-link the kernel modules on-the-fly.
	hsfconfig --auto is once again executed automatically during
	installation of distribution-specific RPMs.
	- Updated README, INSTALL and BUGS documentation files.

* Thu May 23 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.L2mbsibeta02052300.

* Thu May 23 2002 Marc Boucher
	- Merged new improved Conexant modem code (v5.03.03.L2).
	- scripts/hsfconfig.in: remove old /dev/modem after configuring devfs.

* Tue May 21 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.01mbsibeta02052102.

* Tue May 21 2002 Marc Boucher
	- Fixed EPRINTF() macro so that notice about unsupported AC97 codec
	is printed.

* Tue May 21 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.01mbsibeta02052101.

* Tue May 21 2002 Marc Boucher
	- modules/makefile: Added binary module support for SuSE 8.0 (2.4.18-4GB)

* Tue May 21 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.01mbsibeta02052100.

* Mon May 20 2002 Marc Boucher
	- scripts/hsfconfig.in: Improved devfs configuration to hopefully solve
	automatic module loading/device node visibility issues.
	- modules/makefile: Added binary module support for RedHat 7.3
	- modules/makefile, common.mak: implemented workaround for
	obscure make bug causing compilation to fail with the error
	"make: expand.c:489: allocated_variable_append:
	Assertion `current_variable_set_list->next != 0' failed."
	- inf/linux_hsfi.inf: adjusted RELAYS to fix RING detection
	on AOpen FM56-SV (VEN_14F1&DEV_2F01&SUBSYS_00C1A0A0&REV_01) and added
	PCI\VEN_14F1&DEV_2F01.

* Sat May 18 2002 Marc Boucher
	- inf/linux_hsf.inf: added PCI\VEN_127A&DEV_2114&SUBSYS_21141436
	(Thanks to Martin Breuer)
	- scripts/hsfconfig.in: proper ISO-3166 country map entries for
	ARGENTINA, BRAZIL, CZECH_REPUBLIC, and NETHERLANDS.

* Mon May  6 2002 Marc Boucher
	- scripts/hsfconfig.in: warn that some 127a:1025/2005 modems might be HCF

* Sun May  5 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.01mbsibeta02050500.

* Sun May  5 2002 Marc Boucher
	- Changed ttyHSF0 device name to ttySHSF0 for compatibility with wvdial.

* Fri May  3 2002 Marc Boucher
	- Released hsflinmodem-5.03.03.01mbsibeta02050300.

* Fri May  3 2002 Marc Boucher
	- Merged new Conexant modem code (v5.03.03.01).

* Thu May  2 2002 Marc Boucher
	- modules/osspec/include/osuniqredef.h: added to solve name collision
	problem with HCF and other modules.

* Fri Apr 26 2002 Marc Boucher
	- Released hsflinmodem-4.06.06.02mbsibeta02042600.

* Fri Apr 26 2002 Marc Boucher
	- scripts/hsfconfig.in: incorporated hsfsysid, added OSKERNTYPE
	which is set to the type of kernel installed, not the architecture.
	- modules/makefile: added i386 to REDHAT_MACHINES to accomodate people
	running i386 kernels on i586/i686 machines, and link-identical-binaries
	to save space.

* Mon Apr 22 2002 Marc Boucher
	- Released hsflinmodem-4.06.06.02mbsibeta02042200.

* Sun Apr 21 2002 Marc Boucher
	- general: Use AT&D2 by default.
	- scripts/hsfconfig.in: added check_unsupported() and other small
	usability improvements.
	- modules/common.mak: changed default KERNELSRC to match hsfconfig.

* Sat Apr 20 2002 Marc Boucher
	- modules/osspec/osstdio.c: if f_op->llseek is NULL, call default_llseek.
	(Thanks to Gratiniano S. de Haro for reporting this problem)
	- imported/hsfich.O: emit error message when encountering unsupported
	AC'97 devices.
	- modules/osspec/osdebug.c: added OsErrorPrintf() and OsErrorVPrintf().
	- scripts/hsfconfig.in: cut down size of default --dumpdiag output.

* Wed Apr 13 2002 Marc Boucher
	- Released hsflinmodem-4.06.06.02mbsibeta02041300.

* Wed Apr 12 2002 Marc Boucher
	- modules/makefile: revamped directory structure for binaries and added
	several mandrake kernels.
	- makefile: added missing bracket to RPMTOPDIRDEFINED test.
	- scripts/hsfconfig.in: create /lib/modules/.../misc directory if it
	doesn't exist and add build kernel-source check.

* Wed Apr 05 2002 Marc Boucher
	- Released hsflinmodem-4.06.06.02mbsibeta02040500.

* Wed Apr 03 2002 Marc Boucher
	- Released hsflinmodem-4.06.06.02mbsibeta02040300.

* Wed Apr 03 2002 Marc Boucher
	- scripts/hsfconfig.in: added check for binary modules with OSKERNVERS_NODASH.
	- modules/osspec/osservices.c: OsSleep() workaround to prevent crashes
	on < 2.2.20 kernels.

* Thu Mar 28 2002 Marc Boucher
	- Added 3COM/USR 14f1:2f14 device type to linux_hsf.inf.
	(thanks to Rob Clark and Bill Ferguson)

* Tue Mar 26 2002 Marc Boucher
	- hsflinmodem.spec.in, makefile: added distribution-specific
	packages containing module binaries for default kernels.

	- modules/osspec/osfloat.c: provide replacement load_mxcsr
	macro for 2.2 if cpu_has_xmm.

	- modules/common.mak: added DISTRO_CFLAGS

	- modules/makefile: added rules to build binaries for mainstream
	distributions.

* Fri Mar 08 2002 Marc Boucher
	- Released hsflinmodem-4.06.06.02mbsibeta02030800.

* Fri Mar 08 2002 Marc Boucher
	- hsflinmodem.spec.in: only run hsfconfig --auto in %post if
	HSF_AUTOCONFIG env variable is set, so as to match INSTALL documentation.

* Thu Mar 05 2002 Marc Boucher
	- Added "Conflicts: hcflinmodem" to RPM spec file as a temporary
	measure until the symbol name collisions are fixed.

* Thu Feb 26 2002 Marc Boucher
	- Released hsflinmodem-4.06.06.02mbsibeta02022600.

* Thu Feb 12 2002 Marc Boucher
	- inf/linux_hsf[i].inf: use generic relay parameters.

* Thu Feb 10 2002 Marc Boucher
	- scripts/hsfconfig.in: if /dev/modem is in use, do not create symlink.

* Fri Feb 08 2002 Marc Boucher
	- inf/linux_intel_smartmc.inf: added 8086:2486 device (thanks to
	Lane Thorne <lthorne@techmate.com> who reported successfully using this inf
	file with his Gateway SoftK56 modem.)

* Tue Jan 28 2002 Marc Boucher
	- scripts/hsfconfig.in: added check for <linux/modversions.h>.
	- makefile, hsflinmodem.spec.in: added qtmodemon utility (present in
	debug versions only) to tar and rpm packages.

* Thu Jan 20 2002 Marc Boucher
	- Released hsflinmodem-4.06.06.02mbsibeta02022000.

* Fri Jan 18 2002 Marc Boucher
	- modules/osspec/osfloat.c: Rewrote OSFloatPrefix/Suffix() to hopefully
	fix the bad interactions with processes using floating point code.
	(Thanks to Christopher Mason <cmason@cmason.com> for reporting this)

* Fri Jan 18 2002 Marc Boucher
	- modules/common.mak: Always use gcc by default due to problems
	with kgcc on mandrake8.

* Thu Jan 17 2002 Marc Boucher
	- inf/linux_intel_smartmc.inf: Added entry for Sony Vaio FX101 ICH modem
	(Thanks to Michael Vogt <mvogt@acm.org>)

* Thu Jan 17 2002 Marc Boucher
	- Merged new Conexant modem code (v4.06.06.02).

* Thu Jan 16 2002 Marc Boucher
	- scripts/hsfconfig.in: remove modules, devfs configuration and
	/dev/ entries upon de-installation.

* Thu Jan 10 2002 Marc Boucher
	- modules/serial_hsf.c: comment-out message about unsupported BREAK
	sending because it confuses people.

* Tue Dec 19 2001 Marc Boucher
	- scripts/hsfconfig.in: update-modules support for debian.
	(Thanks to Julien Gaulmin <julien23@free.fr>)

* Tue Dec 15 2001 Marc Boucher
	- makefile: move uninstall target calling hsfconfig -remove before
	subdirs (removing hsfconfig).

* Tue Dec 14 2001 Marc Boucher
	- Released hsflinmodem-4.06.06.01mbsibeta01121400.

* Tue Dec 14 2001 Marc Boucher
	- Fixed module use count incrementation/decrementation to prevent
	crashes under 2.2.
	- Fixed AT&F command.
	- Improved devfs support.

* Tue Dec 09 2001 Marc Boucher
	- scripts/hsfconfig.in: initial devfsd support, improved dump_diagnostics

* Tue Dec 04 2001 Marc Boucher
	- Released hsflinmodem-4.06.06.01mbsibeta01120400.

* Tue Dec 04 2001 Marc Boucher
	- Merged new Conexant modem code (v4.06.06.01).
	many fixes to modulation code- modem should be more stable now;
	also added Yukon (aka Athens PCI ID 14f1:1631) board support (untested).
	- Added old rockwell (127a) device types to linux_hsf.inf.
	- Added riptide (4311) device type to linux_hsf.inf (experimental).
	- Include version string in new nvram.bin file header to prevent
	inconsistencies.
	- Various other minor changes and improvements.

* Mon Dec 03 2001 Marc Boucher
	- INSTALL: rectify and mention more hsfconfig options.
	- modules/osspec/include/oscompat.h: Added parentheses to try_inc_mod_count.

* Thu Nov 29 2001 Marc Boucher
	- Makefile: Added pkgclean target, which is like 'clean' but also
	removes tar and RPM package files.

* Thu Nov 29 2001 Marc Boucher
	- Makefile, hsflinmodem.spec.in: Automatically append CHANGES file
	to hsflinmodem.spec (%changelog section).

* Wed Nov 28 2001 Marc Boucher
	- modules/common.mak: Don't bail out with $(error) if version.h
	doesn't exist under KERNELSRC.

* Wed Nov 28 2001 Marc Boucher
	- modules/common.mak: Fixed CONFIG_MODVERSIONS check for distributions
	that don't use standard autoconf.h.

* Wed Nov 28 2001 Marc Boucher
	- hsfconfig: Use /boot/vmlinuz.{version,autoconf}.h over KERNELSRC/
	files if the former correspond to the running kernel and the later don't.

	- hsfconfig: Use /usr/local/src/linux as KERNELSRC dir if it exists and
	/usr/src/linux doesn't.

* Tue Nov 27 2001 Marc Boucher
	- Fixed oscompat.h problem with INIT_TQUEUE() macro affecting 2.4.[0-2]

* Tue Nov 27 2001 Marc Boucher
	- Initial beta release (hsflinmodem-4.06.00mbsibeta01112702).
