Readme for HPT3xx RAID Controller Linux Driver
Copyright (C) 2002-2006 HighPoint Technologies, Inc. All rights reserved.


#############################################################################
Revision History:

    v2.1   17Jul2006
           Add IDE passthrough support.
           Remove dependency of drivers/scsi for kernel 2.6.
           Add autorebuild parameter.
           fix build error when NON_RAID=1
           Fix use of pci_enable_device
           Fix reboot hang on kernel 2.6.17.

    v2.0   10Nov2004
           Add support for kernel 2.6.x and x86_64.
           Add support for HPT302/302N IC.
           Use new driver core code.

    v1.35  17Mar2004
           Fix for DW state in thread hpt_wt.
           Update for S-ATA support.

    v1.31  21Dec2002
           Update driver library for GCC 3.2.
           Fix 48-bit LBA compatibility.
           Add support for HPT372N IC.
           Support non-RAID build.

    v1.3   05Apr2002
           It is the same driver code as ver 1.3 but this version opens kernel
           related driver source codes. Users can use this source code to 
           generate HPT37x Linux drivers with current Linux kernel version. 
           Then use it for HPT37x controller installation. Please follow the
           detail instruction in this readme.

    v1.3   02Jan2002
           HPT37x Linux driver object code released for
           a limited certain Linux kernel version.      

    v1.2   15Oct2001

    v1.1   30Jul2001

    v1.0   18Jul2001
           official release

#############################################################################

1. Overview
---------------------
  This package contains Linux driver source code for HighPoint
  HPT370/370A/372/372A/372N/302/302N ATA RAID controllers and RocketRAID 1520
  SATA RAID controllers.

  The source code is for kernel updating purposes - you can use this
  source code to build a driver, if you cannot find one in HighPoint
  Linux driver release package. 

  NO WARRANTY

  THE DRIVER SOURCE CODE HIGHPOINT PROVIDED IS FREE OF CHARGE, AND THERE IS
  NO WARRANTY FOR THE PROGRAM. THERE ARE NO RESTRICTIONS ON THE USE OF THIS
  FREE SOURCE CODE. HIGHPOINT DOES NOT PROVIDE ANY TECHNICAL SUPPORT IF THE
  CODE HAS BEEN CHANGED FROM ORIGINAL SOURCE CODE.

  LIMITATION OF LIABILITY

  IN NO EVENT WILL HIGHPOINT BE LIABLE FOR DIRECT, INDIRECT, SPECIAL,
  INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR
  INABILITY TO USE THIS PRODUCT OR DOCUMENTATION, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGES. IN PARTICULAR, HIGHPOINT SHALL NOT HAVE
  LIABILITY FOR ANY HARDWARE, SOFTWARE, OR DATA STORED USED WITH THE
  PRODUCT, INCLUDING THE COSTS OF REPAIRING, REPLACING, OR RECOVERING
  SUCH HARDWARE, OR DATA.

  
2. Build the driver
---------------------
  
  1) Install kernel build tools (gcc, binutils, make, etc.)
  
  2) Setup the kernel source/headers
  
     To build driver modules for a specific kernel, you shall use same 
     configuration for the kernel and the driver. Otherwise, the driver may 
     be unable to load, or behave abnormally.
     
     - For Linux kernel 2.6 -
     
     On most distributions based on kernel 2.6, an exploded source tree is not
     required to build a driver against the currently in-use kernel. As long
     as the system has kernel headers setup under /lib/modules/`uname -r`/build,
     you can simply run "make" to build the driver.

     If you want to build the driver against a custom kernel source, you must
     setup the kernel source manually and run "make" under kernel source tree
     to setup kernel headers.

     - For Linux kernel 2.4 -
     
     You need a full kernel source tree to build the driver. If you are building
     a driver for the currently in-use kernel, the kernel source should match
     the version of the running kernel. In addition, you must obtain the config
     file for the running kernel:
     
        For Red Hat or Fedora Linux, you can find the stock kernel config files
        under {kernel-source-dir}/configs, named kernel-*.config. Select the one
        matches your hardware and copy it to {kernel-source-dir}/.config.
        
        For SuSE Linux, the config files for current kernel is under /boot dir
        so you can the kernel source by
        
            # cd /usr/src/linux-{kernel-version}.SuSE
            # cp /boot/vmlinuz.config .config
            # cp /boot/vmlinuz.version.h include/linux/version.h
            # cp /boot/vmlinuz.autoconf.h include/linux/autoconf.h

        For other distributions please refer to the distribution documents to 
        obtain the config file.
        
        If you are building a custom kernel and a driver, you can setup the kernel
        config by yourself, using "make config" or "make menuconfig" commands
        under kernel source directory.
        
     Once the kernel config file is ready, run following commands under kernel
     source directory to setup kernel headers:
     
            # make oldconfig
            # make dep
        
     On some Red Hat versions, {kernel-source-dir}/include/linux/modversions.h
     may be incorrect after "make dep", you need check if there is a line 
     "#include <linux/rhconfig.h>" before "#include <linux/modsetver.h>" in that
     file. If not, please add the line manually.

     Users need to install the kernel source package and setup kernel
     headers with proper configuration before building the driver.
   
     You shall use same configuration for the kernel and the driver.
     Otherwise the driver may be unable to load or work abnormally.

     If you are using stock kernel, obtain the configuration in your Linux
     distribution (e.g. the kernel configuration file for Red Hat stock kernel
     can be found under "configs" directory in kernel source tree). Copy the
     configuration file to <your-kernel-source-dir>/.config and setup the
     kernel headers using "make oldconfig" and "make dep" commands before you
     build the driver.
     
     Please refer to the documents in your Linux distribution for kernel
     configuration.

     If the kernel contains built-in IDE support for your HPT3xx controller,
     you must rebuild and install a kernel without HPT37x controller support
     before using this driver. Please refer to kernel documents for how to 
     configure/update the kernel.
     
  2) Extract the driver files to somewhere. e.g. /usr/src/hpt37x2

  3) Build the driver:

        # cd /usr/src/hpt37x2
        # make KERNELDIR=/usr/src/linux-2.6.4-52-default
        
     Available make options:
     
       KERNELDIR=...
           Specify kernel source directory. If not specified the driver will
           use /lib/modules/{kernel-version}/build/ as the default location.
           This option is needed if you have a manually configured kernel
           source tree.
           
       RR1520=
           RR1520=1 for RocketRAID 1520 SATA controller. (Default)
           RR1520=0 for HPT3xx based PATA RAID controllers.
     
       NON_RAID=
           NON_RAID=0 to build the driver with RAID support.(Default)
           NON_RAID=1 to build the driver without RAID support.

     
3. Using the driver
---------------------
    
  1) Load module "scsi_mod" and "sd_mod" if they are not built into kernel:

        # modprobe sd_mod

  2) Load the driver.
        
        # insmod ./hpt37x2.o

     For kernel 2.6, the driver module is "hpt37x2.ko". Also you need to use 
     the 2.5/2.6 module-init-tools (you can get them from
     http://www.kernel.org/pub/linux/kernel/people/rusty/modules/).
     modutils from 2.4 won't work with 2.5/2.6. 


5. Known problems
-------------------
  * Driver hang on SMP system using SuSE Linux 8.1

    The stock kernel shipped with SuSE Linux 8.1 has problems with the ACPI
    code. To using the driver, pass the following option to kernel manually
    at boot time:

        acpi=off

    You can also permanently add that line to your boot options before using
    the driver.

    It's recommend that you update your SuSE k_smp kernel to newer version.


#############################################################################
Technical support and service

  If you have questions about installing or using your HighPoint product,
  check the user's guide or readme file first, and you will find answers to
  most of your questions here. If you need further assistance, please
  contact us. We offer the following support and information services:

  1)  The HighPoint Web Site provides information on software upgrades,
      answers to common questions, and other topics. The Web Site is
      available from Internet 24 hours a day, 7 days a week, at
      http://www.highpoint-tech.com.

  2)  For technical support, send e-mail to support@highpoint-tech.com

  NOTE: Before you send an e-mail, please visit our Web Site
        (http://www.highpoint-tech.com) to check if there is a new or 
        updated device driver for your system.
