docs: networking: device drivers: convert dlink/dl2k.txt to ReST
- add SPDX header; - mark code blocks and literals as such; - mark lists as such; - adjust identation, whitespaces and blank lines where needed; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c981977d3a
commit
ca705e4793
@ -1,10 +1,13 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
=========================================================
|
||||||
D-Link DL2000-based Gigabit Ethernet Adapter Installation
|
D-Link DL2000-based Gigabit Ethernet Adapter Installation
|
||||||
for Linux
|
=========================================================
|
||||||
|
|
||||||
May 23, 2002
|
May 23, 2002
|
||||||
|
|
||||||
Contents
|
.. Contents
|
||||||
========
|
|
||||||
- Compatibility List
|
- Compatibility List
|
||||||
- Quick Install
|
- Quick Install
|
||||||
- Compiling the Driver
|
- Compiling the Driver
|
||||||
@ -15,12 +18,13 @@ Contents
|
|||||||
|
|
||||||
|
|
||||||
Compatibility List
|
Compatibility List
|
||||||
=================
|
==================
|
||||||
|
|
||||||
Adapter Support:
|
Adapter Support:
|
||||||
|
|
||||||
D-Link DGE-550T Gigabit Ethernet Adapter.
|
- D-Link DGE-550T Gigabit Ethernet Adapter.
|
||||||
D-Link DGE-550SX Gigabit Ethernet Adapter.
|
- D-Link DGE-550SX Gigabit Ethernet Adapter.
|
||||||
D-Link DL2000-based Gigabit Ethernet Adapter.
|
- D-Link DL2000-based Gigabit Ethernet Adapter.
|
||||||
|
|
||||||
|
|
||||||
The driver support Linux kernel 2.4.7 later. We had tested it
|
The driver support Linux kernel 2.4.7 later. We had tested it
|
||||||
@ -34,22 +38,26 @@ on the environments below.
|
|||||||
|
|
||||||
Quick Install
|
Quick Install
|
||||||
=============
|
=============
|
||||||
Install linux driver as following command:
|
Install linux driver as following command::
|
||||||
|
|
||||||
1. make all
|
1. make all
|
||||||
2. insmod dl2k.ko
|
2. insmod dl2k.ko
|
||||||
3. ifconfig eth0 up 10.xxx.xxx.xxx netmask 255.0.0.0
|
3. ifconfig eth0 up 10.xxx.xxx.xxx netmask 255.0.0.0
|
||||||
^^^^^^^^^^^^^^^\ ^^^^^^^^\
|
^^^^^^^^^^^^^^^\ ^^^^^^^^\
|
||||||
IP NETMASK
|
IP NETMASK
|
||||||
|
|
||||||
Now eth0 should active, you can test it by "ping" or get more information by
|
Now eth0 should active, you can test it by "ping" or get more information by
|
||||||
"ifconfig". If tested ok, continue the next step.
|
"ifconfig". If tested ok, continue the next step.
|
||||||
|
|
||||||
4. cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net
|
4. ``cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net``
|
||||||
5. Add the following line to /etc/modprobe.d/dl2k.conf:
|
5. Add the following line to /etc/modprobe.d/dl2k.conf::
|
||||||
|
|
||||||
alias eth0 dl2k
|
alias eth0 dl2k
|
||||||
6. Run depmod to updated module indexes.
|
|
||||||
7. Run "netconfig" or "netconf" to create configuration script ifcfg-eth0
|
6. Run ``depmod`` to updated module indexes.
|
||||||
|
7. Run ``netconfig`` or ``netconf`` to create configuration script ifcfg-eth0
|
||||||
located at /etc/sysconfig/network-scripts or create it manually.
|
located at /etc/sysconfig/network-scripts or create it manually.
|
||||||
|
|
||||||
[see - Configuration Script Sample]
|
[see - Configuration Script Sample]
|
||||||
8. Driver will automatically load and configure at next boot time.
|
8. Driver will automatically load and configure at next boot time.
|
||||||
|
|
||||||
@ -73,6 +81,8 @@ to compile and link the driver:
|
|||||||
CD-ROM drive
|
CD-ROM drive
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
[root@XXX /] mkdir cdrom
|
[root@XXX /] mkdir cdrom
|
||||||
[root@XXX /] mount -r -t iso9660 -o conv=auto /dev/cdrom /cdrom
|
[root@XXX /] mount -r -t iso9660 -o conv=auto /dev/cdrom /cdrom
|
||||||
[root@XXX /] cd root
|
[root@XXX /] cd root
|
||||||
@ -85,6 +95,8 @@ CD-ROM drive
|
|||||||
Floppy disc drive
|
Floppy disc drive
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
[root@XXX /] cd root
|
[root@XXX /] cd root
|
||||||
[root@XXX /root] mkdir dl2k
|
[root@XXX /root] mkdir dl2k
|
||||||
[root@XXX /root] cd dl2k
|
[root@XXX /root] cd dl2k
|
||||||
@ -97,33 +109,44 @@ Installing the Driver
|
|||||||
|
|
||||||
Manual Installation
|
Manual Installation
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
Once the driver has been compiled, it must be loaded, enabled, and bound
|
Once the driver has been compiled, it must be loaded, enabled, and bound
|
||||||
to a protocol stack in order to establish network connectivity. To load a
|
to a protocol stack in order to establish network connectivity. To load a
|
||||||
module enter the command:
|
module enter the command::
|
||||||
|
|
||||||
insmod dl2k.o
|
insmod dl2k.o
|
||||||
|
|
||||||
or
|
or::
|
||||||
|
|
||||||
insmod dl2k.o <optional parameter> ; add parameter
|
insmod dl2k.o <optional parameter> ; add parameter
|
||||||
|
|
||||||
===============================================================
|
---------------------------------------------------------
|
||||||
example: insmod dl2k.o media=100mbps_hd
|
|
||||||
or insmod dl2k.o media=3
|
example::
|
||||||
or insmod dl2k.o media=3,2 ; for 2 cards
|
|
||||||
===============================================================
|
insmod dl2k.o media=100mbps_hd
|
||||||
|
|
||||||
|
or::
|
||||||
|
|
||||||
|
insmod dl2k.o media=3
|
||||||
|
|
||||||
|
or::
|
||||||
|
|
||||||
|
insmod dl2k.o media=3,2 ; for 2 cards
|
||||||
|
|
||||||
|
---------------------------------------------------------
|
||||||
|
|
||||||
Please reference the list of the command line parameters supported by
|
Please reference the list of the command line parameters supported by
|
||||||
the Linux device driver below.
|
the Linux device driver below.
|
||||||
|
|
||||||
The insmod command only loads the driver and gives it a name of the form
|
The insmod command only loads the driver and gives it a name of the form
|
||||||
eth0, eth1, etc. To bring the NIC into an operational state,
|
eth0, eth1, etc. To bring the NIC into an operational state,
|
||||||
it is necessary to issue the following command:
|
it is necessary to issue the following command::
|
||||||
|
|
||||||
ifconfig eth0 up
|
ifconfig eth0 up
|
||||||
|
|
||||||
Finally, to bind the driver to the active protocol (e.g., TCP/IP with
|
Finally, to bind the driver to the active protocol (e.g., TCP/IP with
|
||||||
Linux), enter the following command:
|
Linux), enter the following command::
|
||||||
|
|
||||||
ifup eth0
|
ifup eth0
|
||||||
|
|
||||||
@ -131,14 +154,14 @@ Installing the Driver
|
|||||||
script that contains the necessary network information. A sample will be
|
script that contains the necessary network information. A sample will be
|
||||||
given in the next paragraph.
|
given in the next paragraph.
|
||||||
|
|
||||||
The commands to unload a driver are as follows:
|
The commands to unload a driver are as follows::
|
||||||
|
|
||||||
ifdown eth0
|
ifdown eth0
|
||||||
ifconfig eth0 down
|
ifconfig eth0 down
|
||||||
rmmod dl2k.o
|
rmmod dl2k.o
|
||||||
|
|
||||||
The following are the commands to list the currently loaded modules and
|
The following are the commands to list the currently loaded modules and
|
||||||
to see the current network configuration.
|
to see the current network configuration::
|
||||||
|
|
||||||
lsmod
|
lsmod
|
||||||
ifconfig
|
ifconfig
|
||||||
@ -156,7 +179,7 @@ Installing the Driver
|
|||||||
1. Copy dl2k.o to the network modules directory, typically
|
1. Copy dl2k.o to the network modules directory, typically
|
||||||
/lib/modules/2.x.x-xx/net or /lib/modules/2.x.x/kernel/drivers/net.
|
/lib/modules/2.x.x-xx/net or /lib/modules/2.x.x/kernel/drivers/net.
|
||||||
2. Locate the boot module configuration file, most commonly in the
|
2. Locate the boot module configuration file, most commonly in the
|
||||||
/etc/modprobe.d/ directory. Add the following lines:
|
/etc/modprobe.d/ directory. Add the following lines::
|
||||||
|
|
||||||
alias ethx dl2k
|
alias ethx dl2k
|
||||||
options dl2k <optional parameters>
|
options dl2k <optional parameters>
|
||||||
@ -180,11 +203,15 @@ parameter. Below is a list of the command line parameters supported by the
|
|||||||
Linux device
|
Linux device
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
mtu=packet_size - Specifies the maximum packet size. default
|
|
||||||
|
=============================== ==============================================
|
||||||
|
mtu=packet_size Specifies the maximum packet size. default
|
||||||
is 1500.
|
is 1500.
|
||||||
|
|
||||||
media=media_type - Specifies the media type the NIC operates at.
|
media=media_type Specifies the media type the NIC operates at.
|
||||||
autosense Autosensing active media.
|
autosense Autosensing active media.
|
||||||
|
|
||||||
|
=========== =========================
|
||||||
10mbps_hd 10Mbps half duplex.
|
10mbps_hd 10Mbps half duplex.
|
||||||
10mbps_fd 10Mbps full duplex.
|
10mbps_fd 10Mbps full duplex.
|
||||||
100mbps_hd 100Mbps half duplex.
|
100mbps_hd 100Mbps half duplex.
|
||||||
@ -198,16 +225,17 @@ media=media_type - Specifies the media type the NIC operates at.
|
|||||||
4 100Mbps full duplex.
|
4 100Mbps full duplex.
|
||||||
5 1000Mbps half duplex.
|
5 1000Mbps half duplex.
|
||||||
6 1000Mbps full duplex.
|
6 1000Mbps full duplex.
|
||||||
|
=========== =========================
|
||||||
|
|
||||||
By default, the NIC operates at autosense.
|
By default, the NIC operates at autosense.
|
||||||
1000mbps_fd and 1000mbps_hd types are only
|
1000mbps_fd and 1000mbps_hd types are only
|
||||||
available for fiber adapter.
|
available for fiber adapter.
|
||||||
|
|
||||||
vlan=n - Specifies the VLAN ID. If vlan=0, the
|
vlan=n Specifies the VLAN ID. If vlan=0, the
|
||||||
Virtual Local Area Network (VLAN) function is
|
Virtual Local Area Network (VLAN) function is
|
||||||
disable.
|
disable.
|
||||||
|
|
||||||
jumbo=[0|1] - Specifies the jumbo frame support. If jumbo=1,
|
jumbo=[0|1] Specifies the jumbo frame support. If jumbo=1,
|
||||||
the NIC accept jumbo frames. By default, this
|
the NIC accept jumbo frames. By default, this
|
||||||
function is disabled.
|
function is disabled.
|
||||||
Jumbo frame usually improve the performance
|
Jumbo frame usually improve the performance
|
||||||
@ -215,8 +243,8 @@ jumbo=[0|1] - Specifies the jumbo frame support. If jumbo=1,
|
|||||||
This feature need jumbo frame compatible
|
This feature need jumbo frame compatible
|
||||||
remote.
|
remote.
|
||||||
|
|
||||||
rx_coalesce=m - Number of rx frame handled each interrupt.
|
rx_coalesce=m Number of rx frame handled each interrupt.
|
||||||
rx_timeout=n - Rx DMA wait time for an interrupt.
|
rx_timeout=n Rx DMA wait time for an interrupt.
|
||||||
If set rx_coalesce > 0, hardware only assert
|
If set rx_coalesce > 0, hardware only assert
|
||||||
an interrupt for m frames. Hardware won't
|
an interrupt for m frames. Hardware won't
|
||||||
assert rx interrupt until m frames received or
|
assert rx interrupt until m frames received or
|
||||||
@ -229,22 +257,23 @@ rx_timeout=n - Rx DMA wait time for an interrupt.
|
|||||||
that is, hardware assert only 1 interrupt
|
that is, hardware assert only 1 interrupt
|
||||||
for 10 frames received or timeout of 512 us.
|
for 10 frames received or timeout of 512 us.
|
||||||
|
|
||||||
tx_coalesce=n - Number of tx frame handled each interrupt.
|
tx_coalesce=n Number of tx frame handled each interrupt.
|
||||||
Set n > 1 can reduce the interrupts
|
Set n > 1 can reduce the interrupts
|
||||||
congestion usually lower performance of
|
congestion usually lower performance of
|
||||||
high speed network card. Default is 16.
|
high speed network card. Default is 16.
|
||||||
|
|
||||||
tx_flow=[1|0] - Specifies the Tx flow control. If tx_flow=0,
|
tx_flow=[1|0] Specifies the Tx flow control. If tx_flow=0,
|
||||||
the Tx flow control disable else driver
|
the Tx flow control disable else driver
|
||||||
autodetect.
|
autodetect.
|
||||||
rx_flow=[1|0] - Specifies the Rx flow control. If rx_flow=0,
|
rx_flow=[1|0] Specifies the Rx flow control. If rx_flow=0,
|
||||||
the Rx flow control enable else driver
|
the Rx flow control enable else driver
|
||||||
autodetect.
|
autodetect.
|
||||||
|
=============================== ==============================================
|
||||||
|
|
||||||
|
|
||||||
Configuration Script Sample
|
Configuration Script Sample
|
||||||
===========================
|
===========================
|
||||||
Here is a sample of a simple configuration script:
|
Here is a sample of a simple configuration script::
|
||||||
|
|
||||||
DEVICE=eth0
|
DEVICE=eth0
|
||||||
USERCTL=no
|
USERCTL=no
|
||||||
@ -259,24 +288,27 @@ IPADDR=207.200.5.2
|
|||||||
Troubleshooting
|
Troubleshooting
|
||||||
===============
|
===============
|
||||||
Q1. Source files contain ^ M behind every line.
|
Q1. Source files contain ^ M behind every line.
|
||||||
|
|
||||||
Make sure all files are Unix file format (no LF). Try the following
|
Make sure all files are Unix file format (no LF). Try the following
|
||||||
shell command to convert files.
|
shell command to convert files::
|
||||||
|
|
||||||
cat dl2k.c | col -b > dl2k.tmp
|
cat dl2k.c | col -b > dl2k.tmp
|
||||||
mv dl2k.tmp dl2k.c
|
mv dl2k.tmp dl2k.c
|
||||||
|
|
||||||
OR
|
OR::
|
||||||
|
|
||||||
cat dl2k.c | tr -d "\r" > dl2k.tmp
|
cat dl2k.c | tr -d "\r" > dl2k.tmp
|
||||||
mv dl2k.tmp dl2k.c
|
mv dl2k.tmp dl2k.c
|
||||||
|
|
||||||
Q2: Could not find header files (*.h) ?
|
Q2: Could not find header files (``*.h``)?
|
||||||
|
|
||||||
To compile the driver, you need kernel header files. After
|
To compile the driver, you need kernel header files. After
|
||||||
installing the kernel source, the header files are usually located in
|
installing the kernel source, the header files are usually located in
|
||||||
/usr/src/linux/include, which is the default include directory configured
|
/usr/src/linux/include, which is the default include directory configured
|
||||||
in Makefile. For some distributions, there is a copy of header files in
|
in Makefile. For some distributions, there is a copy of header files in
|
||||||
/usr/src/include/linux and /usr/src/include/asm, that you can change the
|
/usr/src/include/linux and /usr/src/include/asm, that you can change the
|
||||||
INCLUDEDIR in Makefile to /usr/include without installing kernel source.
|
INCLUDEDIR in Makefile to /usr/include without installing kernel source.
|
||||||
|
|
||||||
Note that RH 7.0 didn't provide correct header files in /usr/include,
|
Note that RH 7.0 didn't provide correct header files in /usr/include,
|
||||||
including those files will make a wrong version driver.
|
including those files will make a wrong version driver.
|
||||||
|
|
@ -36,6 +36,7 @@ Contents:
|
|||||||
davicom/dm9000
|
davicom/dm9000
|
||||||
dec/de4x5
|
dec/de4x5
|
||||||
dec/dmfe
|
dec/dmfe
|
||||||
|
dlink/dl2k
|
||||||
|
|
||||||
.. only:: subproject and html
|
.. only:: subproject and html
|
||||||
|
|
||||||
|
@ -1869,7 +1869,7 @@ Compile command:
|
|||||||
|
|
||||||
gcc -D__KERNEL__ -DMODULE -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -c dl2k.c
|
gcc -D__KERNEL__ -DMODULE -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -c dl2k.c
|
||||||
|
|
||||||
Read Documentation/networking/device_drivers/dlink/dl2k.txt for details.
|
Read Documentation/networking/device_drivers/dlink/dl2k.rst for details.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user