Install the network card Encore ENL832-TX-ICNT on Linux

From Wiki

Following we show how to install the network card Encore ENL832-TX-ICNT on Linux.


Obs.: You must to have kernel-headers and linux-headers installed


1. Downloading encore drivers:

> wget http://www.encore-usa.com/download/driver/ENL832-TX-ICNT_Drivers.zip


2. Unzip the files:

> unzip ENL832-TX-ICNT_Drivers.zip


3. Change to directory:

> cd ENL832-TX-ICNT_Drivers/Linux

Now lets edit the file "sundance_main_c":


4. Go to line 1400 and change :

pci_dma_sync_single

by:

pci_dma_sync_single_for_cpu


5. Go to line 1653 and delete the line, with following:

strcpy(info.bus_info, np->pci_dev->slot_name); 


6. Save e close the file

7. Compilling

> make all


8. (Optional) if the following error happens

make -C /lib/modules/2.6.18-8.1.8.el5/build SUBDIRS=/root/placarede/ENL832-TX-ICNT_Driver/Linux
 modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-8.1.8.el5-i686'
  CC [M]  /root/placarede/ENL832-TX-ICNT_Driver/Linux/sundance_main.o
/root/placarede/ENL832-TX-ICNT_Driver/Linux/sundance_main.c:221:2: error: invalid preprocessing
  directive #MODULE_PARM
/root/placarede/ENL832-TX-ICNT_Driver/Linux/sundance_main.c:222:2: error: invalid preprocessing
 directive #MODULE_PARM
/root/placarede/ENL832-TX-ICNT_Driver/Linux/sundance_main.c:223:2: error: invalid preprocessing
  directive #MODULE_PARM
/root/placarede/ENL832-TX-ICNT_Driver/Linux/sundance_main.c:224:2: error: invalid preprocessing
directive #MODULE_PARM
/root/placarede/ENL832-TX-ICNT_Driver/Linux/sundance_main.c: In function â__check_mediaâ:
/root/placarede/ENL832-TX-ICNT_Driver/Linux/sundance_main.c:228: warning: return from incompatible
  pointer type
make[2]: *** [/root/placarede/ENL832-TX-ICNT_Driver/Linux/sundance_main.o] Error 1
make[1]: *** [_module_/root/placarede/ENL832-TX-ICNT_Driver/Linux] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-8.1.8.el5-i686'
make: *** [all] Error 2

9.(Optional) Open file sundance_main.c again and search for

  1. include <linux/module.h>
  2. include <linux/kernel.h>
  3. include <linux/string.h>
  4. include <linux/timer.h>

and add this code


#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/timer.h>


10.(Optional) On the lines with problem, toggle comments and change likes


module_param(debug, int,0); //MODULE_PARM(debug, "i");
module_param(rx_copybreak,int,0); //MODULE_PARM(rx_copybreak, "i");
module_param(media,charp,0); //MODULE_PARM(media, "1-" __MODULE_STRING(MAX_UNITS) "s");
module_param(flowctrl,int,0); //MODULE_PARM(flowctrl, "i");


11. Compile again

> make all


This will create files sundance.ko and sundance.o.

12. Copy file sundance.ko to directory:

> /lib/modules/`uname -r`/kernel/drivers/net


13. Loading the modules:

> modprobe sundance

Now config the network.

tags: enl832-tx-icnt linux driver