本文发表在 rolia.net 枫下论坛dmfe.c: Version 1.33 07/20/2000
A DM9102/DM9102A/DM9102A+DM9801(HomeRun)/
DM9102A+DM9802(LongRun) NIC fast ethernet driver for Linux.
Copyright (C) 1997 Sten Wang
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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
A. Compiler command:
A-1: For normal single processor kernel
"gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall
-Wstrict-prototypes -O6 -c dmfe.c"
A-2: For single processor and enable kernel module version function
"gcc -DMODULE -DMODVERSIONS -D__KERNEL__ -I/usr/src/linux/net/inet
-Wall -Wstrict-prototypes -O6 -c dmfe.c"
A-3: For multiple processors(SMP) and enable the module version function
"gcc -D__SMP__ -DMODULE -DMODVERSIONS -D__KERNEL__ -I/usr/src/linux
/net/inet -Wall -Wstrict-prototypes -O6 -c dmfe.c"
Note: O of -O6 is a capital o, not a "0".
B. How to compile driver
B-1: Login by supervisor
B-2: Copy dmfe.c and Makefile into your HD. You can make a new directoty
to put.
B-3: Keep driver source file name as "dmfe.c" and makefile name as
"Makefile"
B-4: You can type the following command to compile driver. Please according
to your system to pick one.
make org ;;
make mod ;;Set version info on all module symbol
make smp ;;symmetric multi-processing(SMP) support
make smp_mod ;;SMP & Set version into on module
Or you can type above compiler command to compile driver.
Note: Please check you must have the right kernel source on
"/usr/src/linux".
C. The following steps teach you how to activate NIC:
C-1: A simple and temporary method
1. Used the upper compiler command to compile dmfe.c
2. Insert dmfe module into kernel
"insmod dmfe" ;;Auto Detection Mode (Suggest)
"insmod dmfe mode=0" ;;Force 10M Half Duplex
"insmod dmfe mode=1" ;;Force 100M Half Duplex
"insmod dmfe mode=4" ;;Force 10M Full Duplex
"insmod dmfe mode=5" ;;Force 100M Full Duplex
"insmod dmfe mode=100" ;;Force 1M HomeRun
"insmod dmfe mode=200" ;;Force 1M LongRun
3. Config a dm9102 network interface
"ifconfig eth0 172.22.3.18"
^^^^^^^^^^^ Your IP address
4. Activate the IP routing table. For some distributions, it is not
necessary. You can type "route" to check.
"route add default eth0"
5. Well done. Your DM9102 adapter actived now.
Note. This is a temporary method. After you reboot the system, you
will lost the setting.
C-2: For Mandrake/Redhat, You can use the following to Activate NIC
1. login your system used the superuser
2. (Mandrake7.0)
rename dmfe_m70.o to dmfe.o and copy dmfe.o into
/lib/modules/2.2.14-15mdk/net to overwrite the old dmfe.o.
or(Mandrake6.1)
rename dmfe_m61.o to dmfe.o and copy dmfe.o into
/lib/modules/2.2.13-7mdk/net to overwrite the old dmfe.o.
or(RedHat6.2)
rename dmfe_r62.o to dmfe.o and copy dmfe.o into
/lib/modules/2.2.14-5.0/net to overwrite the old dmfe.o.
or(RedHat6.1)
rename dmfe_r61.o to dmfe.o and copy dmfe.o into
/lib/modules/2.2.12-20/net to overwrite the old dmfe.o.
or(RedHat6.0)
rename dmfe_r60.o to dmfe.o and copy dmfe.o into
/lib/modules/2.2.5-15/net to overwrite the old dmfe.o.
3. execute "linuxconf".
4. Then select Config->Networking->Client tasks ->Basic host information
5. Fill your IP address, netmask,
net device = eth0
kernel module = dmfe
6. press <Accept> to confirm and exit this setting
7. press <quit> exit the main menu
8. Now it displays "Status of the system" menu. Select <Activate the
changes> to active the new setting and exit.
9. reboot your system and kernel will automatically load driver and
active network.
10. try to ping other host to test your NIC.
D. Object files description:
1. dmfe_r62.o: For Redhat 6.2, kernel version 2.2.14-5.0
2. dmfer61c.o: For Redhat 6.1+CLE0.8, kernel 2.2.12-20
3. dmfe_r60.o: For Redhat 6.0, Kernel 2.2.5-15
4. dmfe_m70.o: For Mandrake 7.0, Kernel 2.2.14-15mdk
5. dmfe_m61.o: For Mandrake 6.1, Kernel 2.2.13-7mdk
6. dmfer60c.o: For RedHat6.0+CLE0.8, kernel 2.2.5-15CLE
7. dmfe_k240t1.o: For Kernel240test1. Without SMP and
did not set version on kernel module.
8. dmfe_k240t4.o: For Kernel240test4. Without SMP and
did not set version on kernel module.
If you can make sure your kernel version, you can rename
to dmfe.o and directly use it without re-compiling.
Author: Sten Wang, 886-3-5798797-8517, E-mail: sten_wang@davicom.com.tw更多精彩文章及讨论,请光临枫下论坛 rolia.net
A DM9102/DM9102A/DM9102A+DM9801(HomeRun)/
DM9102A+DM9802(LongRun) NIC fast ethernet driver for Linux.
Copyright (C) 1997 Sten Wang
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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
A. Compiler command:
A-1: For normal single processor kernel
"gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall
-Wstrict-prototypes -O6 -c dmfe.c"
A-2: For single processor and enable kernel module version function
"gcc -DMODULE -DMODVERSIONS -D__KERNEL__ -I/usr/src/linux/net/inet
-Wall -Wstrict-prototypes -O6 -c dmfe.c"
A-3: For multiple processors(SMP) and enable the module version function
"gcc -D__SMP__ -DMODULE -DMODVERSIONS -D__KERNEL__ -I/usr/src/linux
/net/inet -Wall -Wstrict-prototypes -O6 -c dmfe.c"
Note: O of -O6 is a capital o, not a "0".
B. How to compile driver
B-1: Login by supervisor
B-2: Copy dmfe.c and Makefile into your HD. You can make a new directoty
to put.
B-3: Keep driver source file name as "dmfe.c" and makefile name as
"Makefile"
B-4: You can type the following command to compile driver. Please according
to your system to pick one.
make org ;;
make mod ;;Set version info on all module symbol
make smp ;;symmetric multi-processing(SMP) support
make smp_mod ;;SMP & Set version into on module
Or you can type above compiler command to compile driver.
Note: Please check you must have the right kernel source on
"/usr/src/linux".
C. The following steps teach you how to activate NIC:
C-1: A simple and temporary method
1. Used the upper compiler command to compile dmfe.c
2. Insert dmfe module into kernel
"insmod dmfe" ;;Auto Detection Mode (Suggest)
"insmod dmfe mode=0" ;;Force 10M Half Duplex
"insmod dmfe mode=1" ;;Force 100M Half Duplex
"insmod dmfe mode=4" ;;Force 10M Full Duplex
"insmod dmfe mode=5" ;;Force 100M Full Duplex
"insmod dmfe mode=100" ;;Force 1M HomeRun
"insmod dmfe mode=200" ;;Force 1M LongRun
3. Config a dm9102 network interface
"ifconfig eth0 172.22.3.18"
^^^^^^^^^^^ Your IP address
4. Activate the IP routing table. For some distributions, it is not
necessary. You can type "route" to check.
"route add default eth0"
5. Well done. Your DM9102 adapter actived now.
Note. This is a temporary method. After you reboot the system, you
will lost the setting.
C-2: For Mandrake/Redhat, You can use the following to Activate NIC
1. login your system used the superuser
2. (Mandrake7.0)
rename dmfe_m70.o to dmfe.o and copy dmfe.o into
/lib/modules/2.2.14-15mdk/net to overwrite the old dmfe.o.
or(Mandrake6.1)
rename dmfe_m61.o to dmfe.o and copy dmfe.o into
/lib/modules/2.2.13-7mdk/net to overwrite the old dmfe.o.
or(RedHat6.2)
rename dmfe_r62.o to dmfe.o and copy dmfe.o into
/lib/modules/2.2.14-5.0/net to overwrite the old dmfe.o.
or(RedHat6.1)
rename dmfe_r61.o to dmfe.o and copy dmfe.o into
/lib/modules/2.2.12-20/net to overwrite the old dmfe.o.
or(RedHat6.0)
rename dmfe_r60.o to dmfe.o and copy dmfe.o into
/lib/modules/2.2.5-15/net to overwrite the old dmfe.o.
3. execute "linuxconf".
4. Then select Config->Networking->Client tasks ->Basic host information
5. Fill your IP address, netmask,
net device = eth0
kernel module = dmfe
6. press <Accept> to confirm and exit this setting
7. press <quit> exit the main menu
8. Now it displays "Status of the system" menu. Select <Activate the
changes> to active the new setting and exit.
9. reboot your system and kernel will automatically load driver and
active network.
10. try to ping other host to test your NIC.
D. Object files description:
1. dmfe_r62.o: For Redhat 6.2, kernel version 2.2.14-5.0
2. dmfer61c.o: For Redhat 6.1+CLE0.8, kernel 2.2.12-20
3. dmfe_r60.o: For Redhat 6.0, Kernel 2.2.5-15
4. dmfe_m70.o: For Mandrake 7.0, Kernel 2.2.14-15mdk
5. dmfe_m61.o: For Mandrake 6.1, Kernel 2.2.13-7mdk
6. dmfer60c.o: For RedHat6.0+CLE0.8, kernel 2.2.5-15CLE
7. dmfe_k240t1.o: For Kernel240test1. Without SMP and
did not set version on kernel module.
8. dmfe_k240t4.o: For Kernel240test4. Without SMP and
did not set version on kernel module.
If you can make sure your kernel version, you can rename
to dmfe.o and directly use it without re-compiling.
Author: Sten Wang, 886-3-5798797-8517, E-mail: sten_wang@davicom.com.tw更多精彩文章及讨论,请光临枫下论坛 rolia.net