요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
=========================
3Com Vortex device driver
=========================
Andrew Morton
30 April 2000
This document describes the usage and errata of the 3Com "Vortex" device
driver for Linux, 3c59x.c.
The driver was written by Donald Becker <becker@scyld.com>
Don is no longer the prime maintainer of this version of the driver.
Please report problems to one or more of:
- Andrew Morton
- Netdev mailing list <netdev@vger.kernel.org>
- Linux kernel mailing list <linux-kernel@vger.kernel.org>
Please note the 'Reporting and Diagnosing Problems' section at the end
of this file.
Since kernel 2.3.99-pre6, this driver incorporates the support for the
3c575-series Cardbus cards which used to be handled by 3c575_cb.c.
This driver supports the following hardware:
- 3c590 Vortex 10Mbps
- 3c592 EISA 10Mbps Demon/Vortex
- 3c597 EISA Fast Demon/Vortex
- 3c595 Vortex 100baseTx
- 3c595 Vortex 100baseT4
- 3c595 Vortex 100base-MII
- 3c900 Boomerang 10baseT
- 3c900 Boomerang 10Mbps Combo
- 3c900 Cyclone 10Mbps TPO
- 3c900 Cyclone 10Mbps Combo
- 3c900 Cyclone 10Mbps TPC
- 3c900B-FL Cyclone 10base-FL
- 3c905 Boomerang 100baseTx
- 3c905 Boomerang 100baseT4
- 3c905B Cyclone 100baseTx
- 3c905B Cyclone 10/100/BNC
- 3c905B-FX Cyclone 100baseFx
- 3c905C Tornado
- 3c920B-EMB-WNM (ATI Radeon 9100 IGP)
- 3c980 Cyclone
- 3c980C Python-T
- 3cSOHO100-TX Hurricane
- 3c555 Laptop Hurricane
- 3c556 Laptop Tornado
- 3c556B Laptop Hurricane
- 3c575 [Megahertz] 10/100 LAN CardBus
- 3c575 Boomerang CardBus
- 3CCFE575BT Cyclone CardBus
- 3CCFE575CT Tornado CardBus
- 3CCFE656 Cyclone CardBus
- 3CCFEM656B Cyclone+Winmodem CardBus
- 3CXFEM656C Tornado+Winmodem CardBus
- 3c450 HomePNA Tornado
- 3c920 Tornado
- 3c982 Hydra Dual Port A
- 3c982 Hydra Dual Port B
- 3c905B-T4
- 3c920B-EMB-WNM Tornado
Module parameters
=================
There are several parameters which may be provided to the driver when
its module is loaded. These are usually placed in ``/etc/modprobe.d/*.conf``
configuration files. Example::
options 3c59x debug=3 rx_copybreak=300
If you are using the PCMCIA tools (cardmgr) then the options may be
placed in /etc/pcmcia/config.opts::
module "3c59x" opts "debug=3 rx_copybreak=300"
The supported parameters are:
debug=N
Where N is a number from 0 to 7. Anything above 3 produces a lot
of output in your system logs. debug=1 is default.
options=N1,N2,N3,...
Each number in the list provides an option to the corresponding
network card. So if you have two 3c905's and you wish to provide
them with option 0x204 you would use::
options=0x204,0x204
The individual options are composed of a number of bitfields which
have the following meanings:
Possible media type settings
== =================================
0 10baseT
1 10Mbs AUI
2 undefined
3 10base2 (BNC)
4 100base-TX
5 100base-FX
6 MII (Media Independent Interface)
7 Use default setting from EEPROM
8 Autonegotiate
9 External MII
10 Use default setting from EEPROM
== =================================
When generating a value for the 'options' setting, the above media
selection values may be OR'ed (or added to) the following:
====== =============================================
0x8000 Set driver debugging level to 7
0x4000 Set driver debugging level to 2
0x0400 Enable Wake-on-LAN
0x0200 Force full duplex mode.
0x0010 Bus-master enable bit (Old Vortex cards only)
====== =============================================
For example::
insmod 3c59x options=0x204
will force full-duplex 100base-TX, rather than allowing the usual
autonegotiation.
global_options=N
Sets the ``options`` parameter for all 3c59x NICs in the machine.
Entries in the ``options`` array above will override any setting of
this.
full_duplex=N1,N2,N3...
Similar to bit 9 of 'options'. Forces the corresponding card into
full-duplex mode. Please use this in preference to the ``options``
parameter.
In fact, please don't use this at all! You're better off getting
autonegotiation working properly.
global_full_duplex=N1
Sets full duplex mode for all 3c59x NICs in the machine. Entries
in the ``full_duplex`` array above will override any setting of this.
flow_ctrl=N1,N2,N3...
Use 802.3x MAC-layer flow control. The 3com cards only support the
PAUSE command, which means that they will stop sending packets for a
short period if they receive a PAUSE frame from the link partner.
The driver only allows flow control on a link which is operating in
full duplex mode.
This feature does not appear to work on the 3c905 - only 3c905B and
3c905C have been tested.
The 3com cards appear to only respond to PAUSE frames which are
sent to the reserved destination address of 01:80:c2:00:00:01. They
do not honour PAUSE frames which are sent to the station MAC address.
rx_copybreak=M
The driver preallocates 32 full-sized (1536 byte) network buffers
for receiving. When a packet arrives, the driver has to decide
whether to leave the packet in its full-sized buffer, or to allocate
a smaller buffer and copy the packet across into it.
This is a speed/space tradeoff.
The value of rx_copybreak is used to decide when to make the copy.
If the packet size is less than rx_copybreak, the packet is copied.
The default value for rx_copybreak is 200 bytes.
max_interrupt_work=N
The driver's interrupt service routine can handle many receive and
transmit packets in a single invocation. It does this in a loop.
The value of max_interrupt_work governs how many times the interrupt
service routine will loop. The default value is 32 loops. If this
is exceeded the interrupt service routine gives up and generates a
warning message "eth0: Too much work in interrupt".
hw_checksums=N1,N2,N3,...
Recent 3com NICs are able to generate IPv4, TCP and UDP checksums
in hardware. Linux has used the Rx checksumming for a long time.
The "zero copy" patch which is planned for the 2.4 kernel series
allows you to make use of the NIC's DMA scatter/gather and transmit
checksumming as well.
The driver is set up so that, when the zerocopy patch is applied,
all Tornado and Cyclone devices will use S/G and Tx checksums.
This module parameter has been provided so you can override this
decision. If you think that Tx checksums are causing a problem, you
may disable the feature with ``hw_checksums=0``.
If you think your NIC should be performing Tx checksumming and the
driver isn't enabling it, you can force the use of hardware Tx
checksumming with ``hw_checksums=1``.
The driver drops a message in the logfiles to indicate whether or
not it is using hardware scatter/gather and hardware Tx checksums.
Scatter/gather and hardware checksums provide considerable
performance improvement for the sendfile() system call, but a small
decrease in throughput for send(). There is no effect upon receive
efficiency.
compaq_ioaddr=N,
compaq_irq=N,
compaq_device_id=N
"Variables to work-around the Compaq PCI BIOS32 problem"....
watchdog=N
Sets the time duration (in milliseconds) after which the kernel
decides that the transmitter has become stuck and needs to be reset.
This is mainly for debugging purposes, although it may be advantageous
to increase this value on LANs which have very high collision rates.
The default value is 5000 (5.0 seconds).
enable_wol=N1,N2,N3,...
Enable Wake-on-LAN support for the relevant interface. Donald
Becker's ``ether-wake`` application may be used to wake suspended
machines.
Also enables the NIC's power management support.
global_enable_wol=N
Sets enable_wol mode for all 3c59x NICs in the machine. Entries in
the ``enable_wol`` array above will override any setting of this.
Media selection
---------------
A number of the older NICs such as the 3c590 and 3c900 series have
10base2 and AUI interfaces.
Prior to January, 2001 this driver would autoselect the 10base2 or AUI
port if it didn't detect activity on the 10baseT port. It would then
get stuck on the 10base2 port and a driver reload was necessary to
switch back to 10baseT. This behaviour could not be prevented with a
module option override.
Later (current) versions of the driver _do_ support locking of the
media type. So if you load the driver module with
modprobe 3c59x options=0
it will permanently select the 10baseT port. Automatic selection of
other media types does not occur.
Transmit error, Tx status register 82
-------------------------------------
This is a common error which is almost always caused by another host on
the same network being in full-duplex mode, while this host is in
half-duplex mode. You need to find that other host and make it run in
half-duplex mode or fix this host to run in full-duplex mode.
As a last resort, you can force the 3c59x driver into full-duplex mode
with
options 3c59x full_duplex=1
but this has to be viewed as a workaround for broken network gear and
should only really be used for equipment which cannot autonegotiate.
Additional resources
--------------------
Details of the device driver implementation are at the top of the source file.
Additional documentation is available at Don Becker's Linux Drivers site:
http://www.scyld.com/vortex.html
Donald Becker's driver development site:
http://www.scyld.com/network.html
Donald's vortex-diag program is useful for inspecting the NIC's state:
http://www.scyld.com/ethercard_diag.html
Donald's mii-diag program may be used for inspecting and manipulating
the NIC's Media Independent Interface subsystem:
http://www.scyld.com/ethercard_diag.html#mii-diag
Donald's wake-on-LAN page:
http://www.scyld.com/wakeonlan.html
3Com's DOS-based application for setting up the NICs EEPROMs:
ftp://ftp.3com.com/pub/nic/3c90x/3c90xx2.exe
Autonegotiation notes
---------------------
The driver uses a one-minute heartbeat for adapting to changes in
the external LAN environment if link is up and 5 seconds if link is down.
This means that when, for example, a machine is unplugged from a hubbed
10baseT LAN plugged into a switched 100baseT LAN, the throughput
will be quite dreadful for up to sixty seconds. Be patient.
Cisco interoperability note from Walter Wong <wcw+@CMU.EDU>:
On a side note, adding HAS_NWAY seems to share a problem with the
Cisco 6509 switch. Specifically, you need to change the spanning
tree parameter for the port the machine is plugged into to 'portfast'
mode. Otherwise, the negotiation fails. This has been an issue
we've noticed for a while but haven't had the time to track down.
Cisco switches (Jeff Busch <jbusch@deja.com>)
My "standard config" for ports to which PC's/servers connect directly::
interface FastEthernet0/N
description machinename
load-interval 30
spanning-tree portfast
If autonegotiation is a problem, you may need to specify "speed
100" and "duplex full" as well (or "speed 10" and "duplex half").
WARNING: DO NOT hook up hubs/switches/bridges to these
specially-configured ports! The switch will become very confused.
Reporting and diagnosing problems
---------------------------------
Maintainers find that accurate and complete problem reports are
invaluable in resolving driver problems. We are frequently not able to
reproduce problems and must rely on your patience and efforts to get to
the bottom of the problem.
If you believe you have a driver problem here are some of the
steps you should take:
- Is it really a driver problem?
Eliminate some variables: try different cards, different
computers, different cables, different ports on the switch/hub,
different versions of the kernel or of the driver, etc.
- OK, it's a driver problem.
You need to generate a report. Typically this is an email to the
maintainer and/or netdev@vger.kernel.org. The maintainer's
email address will be in the driver source or in the MAINTAINERS file.
- The contents of your report will vary a lot depending upon the
problem. If it's a kernel crash then you should refer to
'Documentation/admin-guide/reporting-issues.rst'.
But for most problems it is useful to provide the following:
- Kernel version, driver version
- A copy of the banner message which the driver generates when
it is initialised. For example:
eth0: 3Com PCI 3c905C Tornado at 0xa400, 00:50:da:6a:88:f0, IRQ 19
8K byte-wide RAM 5:3 Rx:Tx split, autoselect/Autonegotiate interface.
MII transceiver found at address 24, status 782d.
Enabling bus-master transmits and whole-frame receives.
NOTE: You must provide the ``debug=2`` modprobe option to generate
a full detection message. Please do this::
modprobe 3c59x debug=2
- If it is a PCI device, the relevant output from 'lspci -vx', eg::
00:09.0 Ethernet controller: 3Com Corporation 3c905C-TX [Fast Etherlink] (rev 74)
Subsystem: 3Com Corporation: Unknown device 9200
Flags: bus master, medium devsel, latency 32, IRQ 19
I/O ports at a400 [size=128]
Memory at db000000 (32-bit, non-prefetchable) [size=128]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [dc] Power Management version 2
00: b7 10 00 92 07 00 10 02 74 00 00 02 08 20 00 00
10: 01 a4 00 00 00 00 00 db 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 b7 10 00 10
30: 00 00 00 00 dc 00 00 00 00 00 00 00 05 01 0a 0a
- A description of the environment: 10baseT? 100baseT?
full/half duplex? switched or hubbed?
- Any additional module parameters which you may be providing to the driver.
- Any kernel logs which are produced. The more the merrier.
If this is a large file and you are sending your report to a
mailing list, mention that you have the logfile, but don't send
it. If you're reporting direct to the maintainer then just send
it.
To ensure that all kernel logs are available, add the
following line to /etc/syslog.conf::
kern.* /var/log/messages
Then restart syslogd with::
/etc/rc.d/init.d/syslog restart
(The above may vary, depending upon which Linux distribution you use).
- If your problem is reproducible then that's great. Try the
following:
1) Increase the debug level. Usually this is done via:
a) modprobe driver debug=7
b) In /etc/modprobe.d/driver.conf:
options driver debug=7
2) Recreate the problem with the higher debug level,
send all logs to the maintainer.
3) Download you card's diagnostic tool from Donald
Becker's website <http://www.scyld.com/ethercard_diag.html>.
Download mii-diag.c as well. Build these.
a) Run 'vortex-diag -aaee' and 'mii-diag -v' when the card is
working correctly. Save the output.
b) Run the above commands when the card is malfunctioning. Send
both sets of output.
Finally, please be patient and be prepared to do some work. You may
end up working on this problem for a week or more as the maintainer
asks more questions, asks for more tests, asks for patches to be
applied, etc. At the end of it all, the problem may even remain
unresolved.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
3c59x Vortex driver와 지원 hardware
1-713Com Vortex device driver
Andrew Morton, 2000년 4월 30일
이 문서는 Linux용 3Com `Vortex` device driver인 `3c59x.c`의 사용법과 errata를 설명합니다.
Driver는 Donald Becker `<becker@scyld.com>`가 작성했습니다. Don은 더 이상 이 version의 주 maintainer가 아닙니다. 문제는 Andrew Morton, Netdev mailing list `<netdev@vger.kernel.org>`, Linux kernel mailing list `<linux-kernel@vger.kernel.org>` 중 한 곳 이상에 보고하십시오.
문서 끝의 `Reporting and Diagnosing Problems` 절도 반드시 확인하십시오.
Kernel 2.3.99-pre6부터 이 driver는 이전에 `3c575_cb.c`가 처리하던 3c575 계열 CardBus 지원을 포함합니다.
Driver가 지원하는 hardware는 다음과 같습니다.
- 3c590 Vortex 10Mbps
- 3c592 EISA 10Mbps Demon/Vortex
- 3c597 EISA Fast Demon/Vortex
- 3c595 Vortex 100baseTx
- 3c595 Vortex 100baseT4
- 3c595 Vortex 100base-MII
- 3c900 Boomerang 10baseT
- 3c900 Boomerang 10Mbps Combo
- 3c900 Cyclone 10Mbps TPO
- 3c900 Cyclone 10Mbps Combo
- 3c900 Cyclone 10Mbps TPC
- 3c900B-FL Cyclone 10base-FL
- 3c905 Boomerang 100baseTx
- 3c905 Boomerang 100baseT4
- 3c905B Cyclone 100baseTx
- 3c905B Cyclone 10/100/BNC
- 3c905B-FX Cyclone 100baseFx
- 3c905C Tornado
- 3c920B-EMB-WNM(ATI Radeon 9100 IGP)
- 3c980 Cyclone
- 3c980C Python-T
- 3cSOHO100-TX Hurricane
- 3c555 Laptop Hurricane
- 3c556 Laptop Tornado
- 3c556B Laptop Hurricane
- 3c575 [Megahertz] 10/100 LAN CardBus
- 3c575 Boomerang CardBus
- 3CCFE575BT Cyclone CardBus
- 3CCFE575CT Tornado CardBus
- 3CCFE656 Cyclone CardBus
- 3CCFEM656B Cyclone+Winmodem CardBus
- 3CXFEM656C Tornado+Winmodem CardBus
- 3c450 HomePNA Tornado
- 3c920 Tornado
- 3c982 Hydra Dual Port A
- 3c982 Hydra Dual Port B
- 3c905B-T4
- 3c920B-EMB-WNM Tornado
.. SPDX-License-Identifier: GPL-2.0
=========================
3Com Vortex device driver
=========================
Andrew Morton
30 April 2000
This document describes the usage and errata of the 3Com "Vortex" device
driver for Linux, 3c59x.c.
The driver was written by Donald Becker <becker@scyld.com>
Don is no longer the prime maintainer of this version of the driver.
Please report problems to one or more of:
- Andrew Morton
- Netdev mailing list <netdev@vger.kernel.org>
- Linux kernel mailing list <linux-kernel@vger.kernel.org>
Please note the 'Reporting and Diagnosing Problems' section at the end
of this file.
Since kernel 2.3.99-pre6, this driver incorporates the support for the
3c575-series Cardbus cards which used to be handled by 3c575_cb.c.
This driver supports the following hardware:
- 3c590 Vortex 10Mbps
- 3c592 EISA 10Mbps Demon/Vortex
- 3c597 EISA Fast Demon/Vortex
- 3c595 Vortex 100baseTx
- 3c595 Vortex 100baseT4
- 3c595 Vortex 100base-MII
- 3c900 Boomerang 10baseT
- 3c900 Boomerang 10Mbps Combo
- 3c900 Cyclone 10Mbps TPO
- 3c900 Cyclone 10Mbps Combo
- 3c900 Cyclone 10Mbps TPC
- 3c900B-FL Cyclone 10base-FL
- 3c905 Boomerang 100baseTx
- 3c905 Boomerang 100baseT4
- 3c905B Cyclone 100baseTx
- 3c905B Cyclone 10/100/BNC
- 3c905B-FX Cyclone 100baseFx
- 3c905C Tornado
- 3c920B-EMB-WNM (ATI Radeon 9100 IGP)
- 3c980 Cyclone
- 3c980C Python-T
- 3cSOHO100-TX Hurricane
- 3c555 Laptop Hurricane
- 3c556 Laptop Tornado
- 3c556B Laptop Hurricane
- 3c575 [Megahertz] 10/100 LAN CardBus
- 3c575 Boomerang CardBus
- 3CCFE575BT Cyclone CardBus
- 3CCFE575CT Tornado CardBus
- 3CCFE656 Cyclone CardBus
- 3CCFEM656B Cyclone+Winmodem CardBus
- 3CXFEM656C Tornado+Winmodem CardBus
- 3c450 HomePNA Tornado
- 3c920 Tornado
- 3c982 Hydra Dual Port A
- 3c982 Hydra Dual Port B
- 3c905B-T4
- 3c920B-EMB-WNM Tornado
Module parameter, media bitfield와 flow control
72-174Module parameter
Module을 load할 때 driver에 여러 parameter를 전달할 수 있습니다. 일반적으로 `/etc/modprobe.d/*.conf` configuration file에 둡니다.
options 3c59x debug=3 rx_copybreak=300
PCMCIA tool인 `cardmgr`를 사용한다면 `/etc/pcmcia/config.opts`에 option을 둘 수 있습니다.
module "3c59x" opts "debug=3 rx_copybreak=300"
지원 parameter는 다음과 같습니다.
`debug=N`
`N`은 0부터 7까지입니다. 3보다 크면 system log 출력이 매우 많아집니다. 기본값은 `debug=1`입니다.
`options=N1,N2,N3,...`
List의 각 숫자는 대응하는 network card에 option을 제공합니다. 3c905 두 장 모두에 `0x204`를 적용하려면 다음처럼 씁니다.
options=0x204,0x204
각 option은 다음 의미를 가진 bitfield 조합입니다.
가능한 media type 설정
- 0: 10baseT
- 1: 10 Mb/s AUI
- 2: 정의되지 않음
- 3: 10base2(BNC)
- 4: 100base-TX
- 5: 100base-FX
- 6: MII(Media Independent Interface)
- 7: EEPROM 기본 설정 사용
- 8: Auto-negotiation
- 9: External MII
- 10: EEPROM 기본 설정 사용
Media 선택 값에는 다음 bit를 OR하거나 더할 수 있습니다.
- `0x8000`: Driver debugging level 7
- `0x4000`: Driver debugging level 2
- `0x0400`: Wake-on-LAN 활성화
- `0x0200`: Full-duplex mode 강제
- `0x0010`: Bus-master 활성화 bit, 구형 Vortex card 전용
insmod 3c59x options=0x204
이 예는 일반적인 auto-negotiation 대신 full-duplex 100base-TX를 강제합니다.
`global_options=N`
System의 모든 3c59x NIC에 `options` parameter를 설정합니다. 앞의 `options` array에 개별 entry가 있으면 global 설정을 override합니다.
`full_duplex=N1,N2,N3...`
`options`의 bit 9와 비슷하게 해당 card를 full-duplex로 강제합니다. `options` parameter보다 이 parameter를 우선 사용하십시오. 그러나 실제로는 이것도 쓰지 말고 auto-negotiation을 올바르게 동작시키는 편이 낫습니다.
`global_full_duplex=N1`
System의 모든 3c59x NIC를 full-duplex로 설정합니다. `full_duplex` array의 개별 entry가 global 설정을 override합니다.
`flow_ctrl=N1,N2,N3...`
802.3x MAC layer flow control을 사용합니다. 3Com card는 PAUSE command만 지원하므로 link partner의 PAUSE frame을 받으면 짧은 시간 packet 전송을 멈춥니다. Driver는 full-duplex link에서만 flow control을 허용합니다.
이 기능은 3c905에서는 동작하지 않는 것으로 보이며 3c905B와 3c905C만 시험되었습니다. Card는 reserved destination address `01:80:c2:00:00:01`로 보낸 PAUSE frame에만 응답하고 station MAC address로 보낸 PAUSE frame은 따르지 않는 것으로 보입니다.
Module parameters
=================
There are several parameters which may be provided to the driver when
its module is loaded. These are usually placed in ``/etc/modprobe.d/*.conf``
configuration files. Example::
options 3c59x debug=3 rx_copybreak=300
If you are using the PCMCIA tools (cardmgr) then the options may be
placed in /etc/pcmcia/config.opts::
module "3c59x" opts "debug=3 rx_copybreak=300"
The supported parameters are:
debug=N
Where N is a number from 0 to 7. Anything above 3 produces a lot
of output in your system logs. debug=1 is default.
options=N1,N2,N3,...
Each number in the list provides an option to the corresponding
network card. So if you have two 3c905's and you wish to provide
them with option 0x204 you would use::
options=0x204,0x204
The individual options are composed of a number of bitfields which
have the following meanings:
Possible media type settings
== =================================
0 10baseT
1 10Mbs AUI
2 undefined
3 10base2 (BNC)
4 100base-TX
5 100base-FX
6 MII (Media Independent Interface)
7 Use default setting from EEPROM
8 Autonegotiate
9 External MII
10 Use default setting from EEPROM
== =================================
When generating a value for the 'options' setting, the above media
selection values may be OR'ed (or added to) the following:
====== =============================================
0x8000 Set driver debugging level to 7
0x4000 Set driver debugging level to 2
0x0400 Enable Wake-on-LAN
0x0200 Force full duplex mode.
0x0010 Bus-master enable bit (Old Vortex cards only)
====== =============================================
For example::
insmod 3c59x options=0x204
will force full-duplex 100base-TX, rather than allowing the usual
autonegotiation.
global_options=N
Sets the ``options`` parameter for all 3c59x NICs in the machine.
Entries in the ``options`` array above will override any setting of
this.
full_duplex=N1,N2,N3...
Similar to bit 9 of 'options'. Forces the corresponding card into
full-duplex mode. Please use this in preference to the ``options``
parameter.
In fact, please don't use this at all! You're better off getting
autonegotiation working properly.
global_full_duplex=N1
Sets full duplex mode for all 3c59x NICs in the machine. Entries
in the ``full_duplex`` array above will override any setting of this.
flow_ctrl=N1,N2,N3...
Use 802.3x MAC-layer flow control. The 3com cards only support the
PAUSE command, which means that they will stop sending packets for a
short period if they receive a PAUSE frame from the link partner.
The driver only allows flow control on a link which is operating in
full duplex mode.
This feature does not appear to work on the 3c905 - only 3c905B and
3c905C have been tested.
The 3com cards appear to only respond to PAUSE frames which are
sent to the reserved destination address of 01:80:c2:00:00:01. They
do not honour PAUSE frames which are sent to the station MAC address.
RX copy, interrupt, checksum, watchdog와 Wake-on-LAN
175-250`rx_copybreak=M`
Driver는 수신용으로 full-size 1536 byte network buffer 32개를 미리 할당합니다. Packet이 오면 full-size buffer에 그대로 둘지 더 작은 buffer를 할당해 복사할지 결정해야 하며, 이는 속도와 공간의 trade-off입니다.
Packet 크기가 `rx_copybreak`보다 작으면 복사합니다. 기본값은 200 byte입니다.
`max_interrupt_work=N`
Driver ISR은 한 번 호출될 때 loop를 돌며 여러 RX·TX packet을 처리합니다. `max_interrupt_work`는 loop 횟수를 제한하며 기본값은 32입니다. 이를 넘으면 ISR은 중단하고 `eth0: Too much work in interrupt` 경고를 출력합니다.
`hw_checksums=N1,N2,N3,...`
최신 3Com NIC는 IPv4, TCP, UDP checksum을 hardware에서 생성할 수 있습니다. Linux는 오래전부터 RX checksum을 사용했습니다. 2.4 kernel 계열에 예정되었던 `zero copy` patch는 NIC의 DMA scatter/gather와 TX checksum도 사용할 수 있게 합니다.
Driver는 zero-copy patch가 적용되면 모든 Tornado와 Cyclone device에서 scatter/gather와 TX checksum을 사용하도록 구성되어 있습니다. `hw_checksums` module parameter로 이 판단을 override할 수 있습니다.
TX checksum이 문제를 일으킨다고 생각하면 `hw_checksums=0`으로 끌 수 있습니다. NIC가 TX checksum을 수행해야 하는데 driver가 켜지 않는다면 `hw_checksums=1`로 강제할 수 있습니다. Driver는 hardware scatter/gather와 TX checksum 사용 여부를 log에 남깁니다.
Scatter/gather와 hardware checksum은 `sendfile()` system call의 성능을 상당히 높이지만 `send()` throughput은 조금 낮춥니다. 수신 효율에는 영향이 없습니다.
`compaq_ioaddr=N`, `compaq_irq=N`, `compaq_device_id=N`
Compaq PCI BIOS32 문제를 우회하기 위한 변수입니다.
`watchdog=N`
Transmitter가 멈춰 reset해야 한다고 kernel이 판단할 때까지의 시간을 millisecond로 설정합니다. 주로 debugging용이지만 collision rate가 매우 높은 LAN에서는 값을 늘리는 것이 유리할 수 있습니다. 기본값은 5000, 즉 5초입니다.
`enable_wol=N1,N2,N3,...`
해당 interface의 Wake-on-LAN을 활성화합니다. Donald Becker의 `ether-wake` application으로 suspend된 system을 깨울 수 있으며 NIC power management 지원도 함께 켭니다.
`global_enable_wol=N`
System의 모든 3c59x NIC에 `enable_wol` mode를 설정합니다. `enable_wol` array의 개별 entry가 global 값을 override합니다.
rx_copybreak=M
The driver preallocates 32 full-sized (1536 byte) network buffers
for receiving. When a packet arrives, the driver has to decide
whether to leave the packet in its full-sized buffer, or to allocate
a smaller buffer and copy the packet across into it.
This is a speed/space tradeoff.
The value of rx_copybreak is used to decide when to make the copy.
If the packet size is less than rx_copybreak, the packet is copied.
The default value for rx_copybreak is 200 bytes.
max_interrupt_work=N
The driver's interrupt service routine can handle many receive and
transmit packets in a single invocation. It does this in a loop.
The value of max_interrupt_work governs how many times the interrupt
service routine will loop. The default value is 32 loops. If this
is exceeded the interrupt service routine gives up and generates a
warning message "eth0: Too much work in interrupt".
hw_checksums=N1,N2,N3,...
Recent 3com NICs are able to generate IPv4, TCP and UDP checksums
in hardware. Linux has used the Rx checksumming for a long time.
The "zero copy" patch which is planned for the 2.4 kernel series
allows you to make use of the NIC's DMA scatter/gather and transmit
checksumming as well.
The driver is set up so that, when the zerocopy patch is applied,
all Tornado and Cyclone devices will use S/G and Tx checksums.
This module parameter has been provided so you can override this
decision. If you think that Tx checksums are causing a problem, you
may disable the feature with ``hw_checksums=0``.
If you think your NIC should be performing Tx checksumming and the
driver isn't enabling it, you can force the use of hardware Tx
checksumming with ``hw_checksums=1``.
The driver drops a message in the logfiles to indicate whether or
not it is using hardware scatter/gather and hardware Tx checksums.
Scatter/gather and hardware checksums provide considerable
performance improvement for the sendfile() system call, but a small
decrease in throughput for send(). There is no effect upon receive
efficiency.
compaq_ioaddr=N,
compaq_irq=N,
compaq_device_id=N
"Variables to work-around the Compaq PCI BIOS32 problem"....
watchdog=N
Sets the time duration (in milliseconds) after which the kernel
decides that the transmitter has become stuck and needs to be reset.
This is mainly for debugging purposes, although it may be advantageous
to increase this value on LANs which have very high collision rates.
The default value is 5000 (5.0 seconds).
enable_wol=N1,N2,N3,...
Enable Wake-on-LAN support for the relevant interface. Donald
Becker's ``ether-wake`` application may be used to wake suspended
machines.
Also enables the NIC's power management support.
global_enable_wol=N
Sets enable_wol mode for all 3c59x NICs in the machine. Entries in
the ``enable_wol`` array above will override any setting of this.
Media 고정, duplex mismatch와 추가 자료
251-319Media 선택
3c590과 3c900 계열 같은 구형 NIC 중에는 10base2와 AUI interface를 가진 제품이 있습니다.
2001년 1월 이전 driver는 10baseT port에서 activity를 찾지 못하면 10base2 또는 AUI port를 자동 선택했습니다. 이후 10base2에 고정되어 10baseT로 돌아가려면 driver를 다시 load해야 했고 module option으로도 막을 수 없었습니다.
후속 현재 version은 media type 고정을 지원합니다. 다음처럼 module을 load하면 10baseT port를 영구 선택하고 다른 media를 자동 선택하지 않습니다.
modprobe 3c59x options=0
`Transmit error, Tx status register 82`
같은 network의 다른 host가 full-duplex이고 이 host가 half-duplex일 때 거의 항상 발생하는 흔한 error입니다. 상대 host를 찾아 half-duplex로 바꾸거나 현재 host를 full-duplex로 바로잡아야 합니다.
최후의 수단으로 다음 설정을 사용해 3c59x driver를 full-duplex로 강제할 수 있습니다.
options 3c59x full_duplex=1
하지만 이는 고장 난 network 장비를 위한 workaround로 보아야 하며 auto-negotiation을 할 수 없는 장비에만 사용해야 합니다.
추가 자료
Device driver 구현 세부 사항은 source file 맨 위에 있습니다.
- Don Becker Linux Drivers 문서: `http://www.scyld.com/vortex.html`
- Donald Becker driver 개발 site: `http://www.scyld.com/network.html`
- NIC state 확인용 `vortex-diag`: `http://www.scyld.com/ethercard_diag.html`
- MII 확인·조작용 `mii-diag`: `http://www.scyld.com/ethercard_diag.html#mii-diag`
- Wake-on-LAN page: `http://www.scyld.com/wakeonlan.html`
- 3Com DOS EEPROM setup application: `ftp://ftp.3com.com/pub/nic/3c90x/3c90xx2.exe`
Media selection
---------------
A number of the older NICs such as the 3c590 and 3c900 series have
10base2 and AUI interfaces.
Prior to January, 2001 this driver would autoselect the 10base2 or AUI
port if it didn't detect activity on the 10baseT port. It would then
get stuck on the 10base2 port and a driver reload was necessary to
switch back to 10baseT. This behaviour could not be prevented with a
module option override.
Later (current) versions of the driver _do_ support locking of the
media type. So if you load the driver module with
modprobe 3c59x options=0
it will permanently select the 10baseT port. Automatic selection of
other media types does not occur.
Transmit error, Tx status register 82
-------------------------------------
This is a common error which is almost always caused by another host on
the same network being in full-duplex mode, while this host is in
half-duplex mode. You need to find that other host and make it run in
half-duplex mode or fix this host to run in full-duplex mode.
As a last resort, you can force the 3c59x driver into full-duplex mode
with
options 3c59x full_duplex=1
but this has to be viewed as a workaround for broken network gear and
should only really be used for equipment which cannot autonegotiate.
Additional resources
--------------------
Details of the device driver implementation are at the top of the source file.
Additional documentation is available at Don Becker's Linux Drivers site:
http://www.scyld.com/vortex.html
Donald Becker's driver development site:
http://www.scyld.com/network.html
Donald's vortex-diag program is useful for inspecting the NIC's state:
http://www.scyld.com/ethercard_diag.html
Donald's mii-diag program may be used for inspecting and manipulating
the NIC's Media Independent Interface subsystem:
http://www.scyld.com/ethercard_diag.html#mii-diag
Donald's wake-on-LAN page:
http://www.scyld.com/wakeonlan.html
3Com's DOS-based application for setting up the NICs EEPROMs:
ftp://ftp.3com.com/pub/nic/3c90x/3c90xx2.exe
Auto-negotiation heartbeat와 Cisco 설정
320-352Auto-negotiation 주석
Driver는 외부 LAN 환경 변화에 적응하기 위해 link가 up이면 1분, down이면 5초 heartbeat를 사용합니다. 예를 들어 hub 기반 10baseT LAN에서 뽑아 switched 100baseT LAN에 꽂으면 최대 60초 동안 throughput이 매우 나쁠 수 있으므로 기다려야 합니다.
Walter Wong `<wcw+@CMU.EDU>`의 Cisco interoperability 주석에 따르면 `HAS_NWAY` 추가 시 Cisco 6509 switch와 문제가 생길 수 있습니다. Machine이 연결된 port의 spanning tree parameter를 `portfast` mode로 바꾸지 않으면 negotiation이 실패합니다.
Jeff Busch `<jbusch@deja.com>`가 PC나 server에 직접 연결하는 Cisco switch port에 사용하는 표준 configuration은 다음과 같습니다.
interface FastEthernet0/N
description machinename
load-interval 30
spanning-tree portfast
Auto-negotiation에 문제가 있으면 `speed 100`과 `duplex full`, 또는 `speed 10`과 `duplex half`도 지정해야 할 수 있습니다.
경고: 이렇게 특별히 구성한 port에 hub, switch, bridge를 연결하지 마십시오. Switch가 매우 혼란스러운 상태가 됩니다.
Autonegotiation notes
---------------------
The driver uses a one-minute heartbeat for adapting to changes in
the external LAN environment if link is up and 5 seconds if link is down.
This means that when, for example, a machine is unplugged from a hubbed
10baseT LAN plugged into a switched 100baseT LAN, the throughput
will be quite dreadful for up to sixty seconds. Be patient.
Cisco interoperability note from Walter Wong <wcw+@CMU.EDU>:
On a side note, adding HAS_NWAY seems to share a problem with the
Cisco 6509 switch. Specifically, you need to change the spanning
tree parameter for the port the machine is plugged into to 'portfast'
mode. Otherwise, the negotiation fails. This has been an issue
we've noticed for a while but haven't had the time to track down.
Cisco switches (Jeff Busch <jbusch@deja.com>)
My "standard config" for ports to which PC's/servers connect directly::
interface FastEthernet0/N
description machinename
load-interval 30
spanning-tree portfast
If autonegotiation is a problem, you may need to specify "speed
100" and "duplex full" as well (or "speed 10" and "duplex half").
WARNING: DO NOT hook up hubs/switches/bridges to these
specially-configured ports! The switch will become very confused.
문제 보고에 필요한 정보
353-431문제 보고와 진단
정확하고 완전한 문제 보고는 maintainer가 driver 문제를 해결하는 데 매우 중요합니다. Maintainer가 문제를 재현할 수 없는 경우가 많으므로 원인을 찾으려면 사용자의 인내와 노력이 필요합니다.
Driver 문제라고 생각한다면 다음 단계를 따르십시오.
정말 driver 문제입니까?
변수를 제거하십시오. 다른 card, computer, cable, switch·hub port, kernel 또는 driver version을 시험합니다.
Driver 문제라고 확인했습니다.
Report를 작성해야 합니다. 보통 maintainer와 `netdev@vger.kernel.org` 중 하나 이상에 email로 보냅니다. Maintainer address는 driver source나 `MAINTAINERS` file에 있습니다.
Report 내용은 문제에 따라 크게 달라집니다. Kernel crash라면 `Documentation/admin-guide/reporting-issues.rst`를 참고하십시오. 일반적인 문제에는 다음 정보가 유용합니다.
- Kernel version과 driver version
- Driver가 초기화될 때 출력한 banner message
- PCI device라면 관련 `lspci -vx` output
- 환경 설명: 10baseT 또는 100baseT, full 또는 half duplex, switch 또는 hub
- Driver에 제공한 추가 module parameter
- 생성된 kernel log
완전한 detection message를 얻으려면 `debug=2` modprobe option을 사용합니다.
modprobe 3c59x debug=2
초기화 banner 예시는 다음과 같습니다.
eth0: 3Com PCI 3c905C Tornado at 0xa400, 00:50:da:6a:88:f0, IRQ 19
8K byte-wide RAM 5:3 Rx:Tx split, autoselect/Autonegotiate interface.
MII transceiver found at address 24, status 782d.
Enabling bus-master transmits and whole-frame receives.
PCI `lspci -vx` 예시는 다음 정보를 포함합니다.
00:09.0 Ethernet controller: 3Com Corporation 3c905C-TX [Fast Etherlink] (rev 74)
Subsystem: 3Com Corporation: Unknown device 9200
Flags: bus master, medium devsel, latency 32, IRQ 19
I/O ports at a400 [size=128]
Memory at db000000 (32-bit, non-prefetchable) [size=128]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [dc] Power Management version 2
00: b7 10 00 92 07 00 10 02 74 00 00 02 08 20 00 00
10: 01 a4 00 00 00 00 00 db 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 b7 10 00 10
30: 00 00 00 00 dc 00 00 00 00 00 00 00 05 01 0a 0a
Kernel log가 크고 mailing list에 report한다면 log를 보유하고 있다고만 밝히고 첨부하지 마십시오. Maintainer에게 직접 보고한다면 그대로 보내도 됩니다.
모든 kernel log를 확보하려면 `/etc/syslog.conf`에 다음 줄을 추가합니다.
kern.* /var/log/messages
그 뒤 `syslogd`를 다시 시작합니다.
/etc/rc.d/init.d/syslog restart
명령과 경로는 Linux distribution에 따라 다를 수 있습니다.
Reporting and diagnosing problems
---------------------------------
Maintainers find that accurate and complete problem reports are
invaluable in resolving driver problems. We are frequently not able to
reproduce problems and must rely on your patience and efforts to get to
the bottom of the problem.
If you believe you have a driver problem here are some of the
steps you should take:
- Is it really a driver problem?
Eliminate some variables: try different cards, different
computers, different cables, different ports on the switch/hub,
different versions of the kernel or of the driver, etc.
- OK, it's a driver problem.
You need to generate a report. Typically this is an email to the
maintainer and/or netdev@vger.kernel.org. The maintainer's
email address will be in the driver source or in the MAINTAINERS file.
- The contents of your report will vary a lot depending upon the
problem. If it's a kernel crash then you should refer to
'Documentation/admin-guide/reporting-issues.rst'.
But for most problems it is useful to provide the following:
- Kernel version, driver version
- A copy of the banner message which the driver generates when
it is initialised. For example:
eth0: 3Com PCI 3c905C Tornado at 0xa400, 00:50:da:6a:88:f0, IRQ 19
8K byte-wide RAM 5:3 Rx:Tx split, autoselect/Autonegotiate interface.
MII transceiver found at address 24, status 782d.
Enabling bus-master transmits and whole-frame receives.
NOTE: You must provide the ``debug=2`` modprobe option to generate
a full detection message. Please do this::
modprobe 3c59x debug=2
- If it is a PCI device, the relevant output from 'lspci -vx', eg::
00:09.0 Ethernet controller: 3Com Corporation 3c905C-TX [Fast Etherlink] (rev 74)
Subsystem: 3Com Corporation: Unknown device 9200
Flags: bus master, medium devsel, latency 32, IRQ 19
I/O ports at a400 [size=128]
Memory at db000000 (32-bit, non-prefetchable) [size=128]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [dc] Power Management version 2
00: b7 10 00 92 07 00 10 02 74 00 00 02 08 20 00 00
10: 01 a4 00 00 00 00 00 db 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 b7 10 00 10
30: 00 00 00 00 dc 00 00 00 00 00 00 00 05 01 0a 0a
- A description of the environment: 10baseT? 100baseT?
full/half duplex? switched or hubbed?
- Any additional module parameters which you may be providing to the driver.
- Any kernel logs which are produced. The more the merrier.
If this is a large file and you are sending your report to a
mailing list, mention that you have the logfile, but don't send
it. If you're reporting direct to the maintainer then just send
it.
To ensure that all kernel logs are available, add the
following line to /etc/syslog.conf::
kern.* /var/log/messages
Then restart syslogd with::
/etc/rc.d/init.d/syslog restart
(The above may vary, depending upon which Linux distribution you use).
재현 가능한 문제의 비교 진단
432-459문제를 재현할 수 있다면 다음 절차를 수행하십시오.
1. Debug level을 높입니다. 보통 다음 두 방식 중 하나를 사용합니다.
- `modprobe driver debug=7`
- `/etc/modprobe.d/driver.conf`에 `options driver debug=7` 추가
2. 높은 debug level에서 문제를 다시 만들고 모든 log를 maintainer에게 보냅니다.
3. Donald Becker의 site `<http://www.scyld.com/ethercard_diag.html>`_에서 card diagnostic tool과 `mii-diag.c`를 내려받아 build합니다.
Card가 정상 동작할 때 `vortex-diag -aaee`와 `mii-diag -v`를 실행해 output을 보관합니다. 오동작할 때 같은 command를 다시 실행한 뒤 두 output set을 모두 보냅니다.
마지막으로 인내심을 가지고 직접 시험 작업을 할 준비를 하십시오. Maintainer가 질문, 추가 시험, patch 적용을 요청하면서 일주일 이상 함께 조사할 수도 있고, 끝내 문제가 해결되지 않을 수도 있습니다.
- If your problem is reproducible then that's great. Try the
following:
1) Increase the debug level. Usually this is done via:
a) modprobe driver debug=7
b) In /etc/modprobe.d/driver.conf:
options driver debug=7
2) Recreate the problem with the higher debug level,
send all logs to the maintainer.
3) Download you card's diagnostic tool from Donald
Becker's website <http://www.scyld.com/ethercard_diag.html>.
Download mii-diag.c as well. Build these.
a) Run 'vortex-diag -aaee' and 'mii-diag -v' when the card is
working correctly. Save the output.
b) Run the above commands when the card is malfunctioning. Send
both sets of output.
Finally, please be patient and be prepared to do some work. You may
end up working on this problem for a week or more as the maintainer
asks more questions, asks for more tests, asks for patches to be
applied, etc. At the end of it all, the problem may even remain
unresolved.
요약·해설
vortex.rst:1-459`3c59x`는 여러 세대의 3Com Vortex·Boomerang·Cyclone·Tornado PCI·EISA·CardBus NIC를 지원합니다. 이 문서는 media bitfield, duplex·flow control, RX copy threshold, hardware checksum, Wake-on-LAN, auto-negotiation과 재현 가능한 문제 보고 절차를 한데 정리합니다.
대표 architecture와 제품군을 묶어 봅니다.
개별 NIC array와 global 값의 관계를 보존합니다.
낮은 bit의 media 선택 값입니다.
Media code와 OR하여 하나의 option 값을 만듭니다.
3Com NIC는 reserved multicast address로 온 PAUSE만 처리합니다.
미리 할당한 1536-byte buffer와 small buffer 사이의 선택입니다.
Scatter/gather와 TX checksum의 workload별 효과입니다.
현재 driver는 10baseT 고정으로 예전의 10base2 stuck 문제를 피합니다.
`Tx status register 82`는 보통 양쪽 duplex가 다를 때 발생합니다.
Link 상태에 따라 환경 변화를 다시 확인하는 주기가 달라집니다.
재현 정보와 환경을 함께 제공해야 진단이 가능합니다.
정상·실패 상태의 hardware diagnostic output을 비교합니다.