qacafe - ip test solutions
Knowledge Base > ATM > How to install the ForeRunner driver for HE 155 ATM cards

How to install the ForeRunner driver for HE 155 ATM cards


Technical Support Note
How to install the ForeRunner driver for HE 155 based ATM cards

The ForeRunner HE 155 ATM card is supported under linux using the "he" driver. This driver is included in the standrd linux kernel starting with version 2.4.22 and some patched versions of 2.4.21. However, to use existing Redhat kernels for Redhat 8 or 9, a patch must be applied to the kernel source and a new kernel module (he) must be built and installed.

The following steps decribe how to patch a stock Redhat 9 kernel. For variations or other configurations, please contact support@qacafe.com.

1. Install the HE 155 card.

    The HE 155 PCI card should be installed in an empty PCI slot on your system. After the card is installed and the system is rebooted, verify the card is visible using the lspci command.
    [root@oakbank root]# /sbin/lspci | grep HE
    02:08.0 ATM network controller: FORE Systems Inc ForeRunnerHE ATM Adapter (rev 01)
    

2. Install the kernel sources.

    You must install the kernel sources for your running kernel under /usr/src. If you are running a Redhat Linux system, you can do this by installing the kernel-source rpm for your system. You can usually find the kernel source rpm on the installation CDs (Install Disk 2 for Redhat 9) or using http://rpmfind.net.
    Example for Redhat 9
    
    [root@oakbank RPMS]# rpm -ivh kernel-source-2.4.20-6.i386.rpm
    warning: kernel-source-2.4.20-6.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
    Preparing...                ########################################### [100%]
       1:kernel-source          ########################################### [100%]
    

    Note: If not already installed, you may also need to install rpm packages for gcc and wish to build the kernel modules.

    # rpm -ivh gcc-3.2.2.2-5.i386.rpm (install cd 2)
    # rpm -ivh tk-8.3.5.-88.i386.rpm (install cd 3)
    

3. Create a /usr/src/linux symbolic link.

    The he.patch is setup to patch the kernel sources under /usr/src/linux. Create a symbolic link to the linux source that was installed in step 2.
    Example:
    
    [root@oakbank src]# ln -s /usr/src/linux-2.4.20-6 /usr/src/linux
    [root@oakbank src]# ls -l
    total 32
    lrwxrwxrwx    1 root     root           23 Sep 30 09:16 linux -> /usr/src/linux-2.4.20-6
    lrwxrwxrwx    1 root     root           14 Sep 30 09:15 linux-2.4 -> linux-2.4.20-6
    drwxr-xr-x   16 root     root         4096 Sep 30 09:15 linux-2.4.20-6
    

4. Apply the the patch.

    You can download a copy of the he patch from:

    ftp://ftp.qacafe.com/pub/user/qacafe/he.patch

    Place he.patch inside the /usr/src/linux directory.

    # cd /usr/src/linux
    # patch -p0 < he.patch
    
    Example:
    
    [root@oakbank linux]# patch -p0 < he.patch
    patching file include/linux/atm_he.h
    patching file drivers/atm/Config.in
    patching file drivers/atm/Makefile
    patching file drivers/atm/he.c
    patching file drivers/atm/he.h
    patching file drivers/atm/suni.c
    patching file drivers/atm/suni.h
    
    

    No errors should occur when the patch is applied.

5. Rebuild the kernel modules

    At this point, you need to rebuild the kernel modules. Since the HE driver will be built as a loadable module, you do not need to rebuild the kernel. You may want to rebuild the kernel as well if you do not wish to modify your current kernel configuration. The following instructions assume you are using a stock redhat kernel configuration.
    From /usr/src/linux:
    
       # make clean
       # make mrproper
    
       Copy the original config file from the configs directory to .config
       This will likely be 
    
       # cp configs/kernel-2.4.20-i686.config .config
    
       Enable the HE driver as a kernel module using xconfig.
    
       # make xconfig
    
       Select Network device support
       Select ATM drivers
       Select 'm' for FORE HE
       Select 'm' for Use S/UNI PHY driver
       Select 'OK'
       Select 'Main Menu'
       Select 'Save & Exit'
    
    
       # If you are not rebuilding the kernel as well, you should edit the Makefile at this
         point so that the kernel module version matches the running kernel.
    
       # edit Makefile
    
       Remove 'custom' from the EXTRAVERSION line
       EXTRAVERSION = -6
    
       (Alternatively, you could rebuild the kernel using a new version such as 'custom' and
       install the new kernel as well. The running kernel version must match the kernel
       version used to build the module. If you are rebuilding the kernel, you do not need
       to edit the Makefile. Steps for rebuilding the kernel at this point are shown under 
       part 6.)
    
       # make dep
    
       # make modules 
       
       This may take a few mintues as all the kernel modules are rebuilt.
    
       # make modules_install
    

6. Optional. You can rebuild the kernel as well. If you are rebuilding the kernel, there is no need to edit the Makefile in step 5.

    To rebuild the kernel:
    
    From /usr/src/linux
    
    # make bzImage
    # make install
    # edit /etc/grub.conf to select new kernel as default (optional)
    # reboot to run new kernel
    

7. Reboot your system

8. Load the he driver

    Once the new modules have been installed and the system is restarted, you can load the he driver and us dmesg to verify that the driver is loaded.
    /sbin/modprobe he
    
    Example:
    
    [root@oakbank root]# /sbin/modprobe he
    
    [root@oakbank root]# dmesg | tail -7
    he: $Id: he.c,v 1.31 2003/02/10 16:11:11 chas Exp $
    PCI: Found IRQ 10 for device 02:08.0
    PCI: Sharing IRQ 10 with 00:1f.3
    PCI: Sharing IRQ 10 with 00:1f.5
    he0: ForeRunnerHE 155MM, 0:20:48:2e:2f:14
    he0: coalescing interrupts
    he0: hell bent for leather!
    

    If you see the "hell bent for leather" line in the dmesg output, the he driver has been loaded and is ready.

    If you see errors in the dmesg output, it may be a indication of a harware problem.

    pci_pool_free 01:07.0/rbpl, 00050037/0 (bad dma)
    pci_pool_free 01:07.0/rbpl, 01a004ce/0 (bad dma)
    

    Check that the card is well seated in the PCI slot and try a different PCI slot.

9. You can set up the system to automatically load the he driver each time the system reboots. See Tech Note 24 - Loading ATM drivers at startup.