vortex.txt 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. Documentation/networking/vortex.txt
  2. Andrew Morton
  3. 30 April 2000
  4. This document describes the usage and errata of the 3Com "Vortex" device
  5. driver for Linux, 3c59x.c.
  6. The driver was written by Donald Becker <becker@scyld.com>
  7. Don is no longer the prime maintainer of this version of the driver.
  8. Please report problems to one or more of:
  9. Andrew Morton
  10. Netdev mailing list <netdev@vger.kernel.org>
  11. Linux kernel mailing list <linux-kernel@vger.kernel.org>
  12. Please note the 'Reporting and Diagnosing Problems' section at the end
  13. of this file.
  14. Since kernel 2.3.99-pre6, this driver incorporates the support for the
  15. 3c575-series Cardbus cards which used to be handled by 3c575_cb.c.
  16. This driver supports the following hardware:
  17. 3c590 Vortex 10Mbps
  18. 3c592 EISA 10Mbps Demon/Vortex
  19. 3c597 EISA Fast Demon/Vortex
  20. 3c595 Vortex 100baseTx
  21. 3c595 Vortex 100baseT4
  22. 3c595 Vortex 100base-MII
  23. 3c900 Boomerang 10baseT
  24. 3c900 Boomerang 10Mbps Combo
  25. 3c900 Cyclone 10Mbps TPO
  26. 3c900 Cyclone 10Mbps Combo
  27. 3c900 Cyclone 10Mbps TPC
  28. 3c900B-FL Cyclone 10base-FL
  29. 3c905 Boomerang 100baseTx
  30. 3c905 Boomerang 100baseT4
  31. 3c905B Cyclone 100baseTx
  32. 3c905B Cyclone 10/100/BNC
  33. 3c905B-FX Cyclone 100baseFx
  34. 3c905C Tornado
  35. 3c920B-EMB-WNM (ATI Radeon 9100 IGP)
  36. 3c980 Cyclone
  37. 3c980C Python-T
  38. 3cSOHO100-TX Hurricane
  39. 3c555 Laptop Hurricane
  40. 3c556 Laptop Tornado
  41. 3c556B Laptop Hurricane
  42. 3c575 [Megahertz] 10/100 LAN CardBus
  43. 3c575 Boomerang CardBus
  44. 3CCFE575BT Cyclone CardBus
  45. 3CCFE575CT Tornado CardBus
  46. 3CCFE656 Cyclone CardBus
  47. 3CCFEM656B Cyclone+Winmodem CardBus
  48. 3CXFEM656C Tornado+Winmodem CardBus
  49. 3c450 HomePNA Tornado
  50. 3c920 Tornado
  51. 3c982 Hydra Dual Port A
  52. 3c982 Hydra Dual Port B
  53. 3c905B-T4
  54. 3c920B-EMB-WNM Tornado
  55. Module parameters
  56. =================
  57. There are several parameters which may be provided to the driver when
  58. its module is loaded. These are usually placed in /etc/modprobe.d/*.conf
  59. configuration files. Example:
  60. options 3c59x debug=3 rx_copybreak=300
  61. If you are using the PCMCIA tools (cardmgr) then the options may be
  62. placed in /etc/pcmcia/config.opts:
  63. module "3c59x" opts "debug=3 rx_copybreak=300"
  64. The supported parameters are:
  65. debug=N
  66. Where N is a number from 0 to 7. Anything above 3 produces a lot
  67. of output in your system logs. debug=1 is default.
  68. options=N1,N2,N3,...
  69. Each number in the list provides an option to the corresponding
  70. network card. So if you have two 3c905's and you wish to provide
  71. them with option 0x204 you would use:
  72. options=0x204,0x204
  73. The individual options are composed of a number of bitfields which
  74. have the following meanings:
  75. Possible media type settings
  76. 0 10baseT
  77. 1 10Mbs AUI
  78. 2 undefined
  79. 3 10base2 (BNC)
  80. 4 100base-TX
  81. 5 100base-FX
  82. 6 MII (Media Independent Interface)
  83. 7 Use default setting from EEPROM
  84. 8 Autonegotiate
  85. 9 External MII
  86. 10 Use default setting from EEPROM
  87. When generating a value for the 'options' setting, the above media
  88. selection values may be OR'ed (or added to) the following:
  89. 0x8000 Set driver debugging level to 7
  90. 0x4000 Set driver debugging level to 2
  91. 0x0400 Enable Wake-on-LAN
  92. 0x0200 Force full duplex mode.
  93. 0x0010 Bus-master enable bit (Old Vortex cards only)
  94. For example:
  95. insmod 3c59x options=0x204
  96. will force full-duplex 100base-TX, rather than allowing the usual
  97. autonegotiation.
  98. global_options=N
  99. Sets the `options' parameter for all 3c59x NICs in the machine.
  100. Entries in the `options' array above will override any setting of
  101. this.
  102. full_duplex=N1,N2,N3...
  103. Similar to bit 9 of 'options'. Forces the corresponding card into
  104. full-duplex mode. Please use this in preference to the `options'
  105. parameter.
  106. In fact, please don't use this at all! You're better off getting
  107. autonegotiation working properly.
  108. global_full_duplex=N1
  109. Sets full duplex mode for all 3c59x NICs in the machine. Entries
  110. in the `full_duplex' array above will override any setting of this.
  111. flow_ctrl=N1,N2,N3...
  112. Use 802.3x MAC-layer flow control. The 3com cards only support the
  113. PAUSE command, which means that they will stop sending packets for a
  114. short period if they receive a PAUSE frame from the link partner.
  115. The driver only allows flow control on a link which is operating in
  116. full duplex mode.
  117. This feature does not appear to work on the 3c905 - only 3c905B and
  118. 3c905C have been tested.
  119. The 3com cards appear to only respond to PAUSE frames which are
  120. sent to the reserved destination address of 01:80:c2:00:00:01. They
  121. do not honour PAUSE frames which are sent to the station MAC address.
  122. rx_copybreak=M
  123. The driver preallocates 32 full-sized (1536 byte) network buffers
  124. for receiving. When a packet arrives, the driver has to decide
  125. whether to leave the packet in its full-sized buffer, or to allocate
  126. a smaller buffer and copy the packet across into it.
  127. This is a speed/space tradeoff.
  128. The value of rx_copybreak is used to decide when to make the copy.
  129. If the packet size is less than rx_copybreak, the packet is copied.
  130. The default value for rx_copybreak is 200 bytes.
  131. max_interrupt_work=N
  132. The driver's interrupt service routine can handle many receive and
  133. transmit packets in a single invocation. It does this in a loop.
  134. The value of max_interrupt_work governs how many times the interrupt
  135. service routine will loop. The default value is 32 loops. If this
  136. is exceeded the interrupt service routine gives up and generates a
  137. warning message "eth0: Too much work in interrupt".
  138. hw_checksums=N1,N2,N3,...
  139. Recent 3com NICs are able to generate IPv4, TCP and UDP checksums
  140. in hardware. Linux has used the Rx checksumming for a long time.
  141. The "zero copy" patch which is planned for the 2.4 kernel series
  142. allows you to make use of the NIC's DMA scatter/gather and transmit
  143. checksumming as well.
  144. The driver is set up so that, when the zerocopy patch is applied,
  145. all Tornado and Cyclone devices will use S/G and Tx checksums.
  146. This module parameter has been provided so you can override this
  147. decision. If you think that Tx checksums are causing a problem, you
  148. may disable the feature with `hw_checksums=0'.
  149. If you think your NIC should be performing Tx checksumming and the
  150. driver isn't enabling it, you can force the use of hardware Tx
  151. checksumming with `hw_checksums=1'.
  152. The driver drops a message in the logfiles to indicate whether or
  153. not it is using hardware scatter/gather and hardware Tx checksums.
  154. Scatter/gather and hardware checksums provide considerable
  155. performance improvement for the sendfile() system call, but a small
  156. decrease in throughput for send(). There is no effect upon receive
  157. efficiency.
  158. compaq_ioaddr=N
  159. compaq_irq=N
  160. compaq_device_id=N
  161. "Variables to work-around the Compaq PCI BIOS32 problem"....
  162. watchdog=N
  163. Sets the time duration (in milliseconds) after which the kernel
  164. decides that the transmitter has become stuck and needs to be reset.
  165. This is mainly for debugging purposes, although it may be advantageous
  166. to increase this value on LANs which have very high collision rates.
  167. The default value is 5000 (5.0 seconds).
  168. enable_wol=N1,N2,N3,...
  169. Enable Wake-on-LAN support for the relevant interface. Donald
  170. Becker's `ether-wake' application may be used to wake suspended
  171. machines.
  172. Also enables the NIC's power management support.
  173. global_enable_wol=N
  174. Sets enable_wol mode for all 3c59x NICs in the machine. Entries in
  175. the `enable_wol' array above will override any setting of this.
  176. Media selection
  177. ---------------
  178. A number of the older NICs such as the 3c590 and 3c900 series have
  179. 10base2 and AUI interfaces.
  180. Prior to January, 2001 this driver would autoeselect the 10base2 or AUI
  181. port if it didn't detect activity on the 10baseT port. It would then
  182. get stuck on the 10base2 port and a driver reload was necessary to
  183. switch back to 10baseT. This behaviour could not be prevented with a
  184. module option override.
  185. Later (current) versions of the driver _do_ support locking of the
  186. media type. So if you load the driver module with
  187. modprobe 3c59x options=0
  188. it will permanently select the 10baseT port. Automatic selection of
  189. other media types does not occur.
  190. Transmit error, Tx status register 82
  191. -------------------------------------
  192. This is a common error which is almost always caused by another host on
  193. the same network being in full-duplex mode, while this host is in
  194. half-duplex mode. You need to find that other host and make it run in
  195. half-duplex mode or fix this host to run in full-duplex mode.
  196. As a last resort, you can force the 3c59x driver into full-duplex mode
  197. with
  198. options 3c59x full_duplex=1
  199. but this has to be viewed as a workaround for broken network gear and
  200. should only really be used for equipment which cannot autonegotiate.
  201. Additional resources
  202. --------------------
  203. Details of the device driver implementation are at the top of the source file.
  204. Additional documentation is available at Don Becker's Linux Drivers site:
  205. http://www.scyld.com/vortex.html
  206. Donald Becker's driver development site:
  207. http://www.scyld.com/network.html
  208. Donald's vortex-diag program is useful for inspecting the NIC's state:
  209. http://www.scyld.com/ethercard_diag.html
  210. Donald's mii-diag program may be used for inspecting and manipulating
  211. the NIC's Media Independent Interface subsystem:
  212. http://www.scyld.com/ethercard_diag.html#mii-diag
  213. Donald's wake-on-LAN page:
  214. http://www.scyld.com/wakeonlan.html
  215. 3Com's DOS-based application for setting up the NICs EEPROMs:
  216. ftp://ftp.3com.com/pub/nic/3c90x/3c90xx2.exe
  217. Autonegotiation notes
  218. ---------------------
  219. The driver uses a one-minute heartbeat for adapting to changes in
  220. the external LAN environment if link is up and 5 seconds if link is down.
  221. This means that when, for example, a machine is unplugged from a hubbed
  222. 10baseT LAN plugged into a switched 100baseT LAN, the throughput
  223. will be quite dreadful for up to sixty seconds. Be patient.
  224. Cisco interoperability note from Walter Wong <wcw+@CMU.EDU>:
  225. On a side note, adding HAS_NWAY seems to share a problem with the
  226. Cisco 6509 switch. Specifically, you need to change the spanning
  227. tree parameter for the port the machine is plugged into to 'portfast'
  228. mode. Otherwise, the negotiation fails. This has been an issue
  229. we've noticed for a while but haven't had the time to track down.
  230. Cisco switches (Jeff Busch <jbusch@deja.com>)
  231. My "standard config" for ports to which PC's/servers connect directly:
  232. interface FastEthernet0/N
  233. description machinename
  234. load-interval 30
  235. spanning-tree portfast
  236. If autonegotiation is a problem, you may need to specify "speed
  237. 100" and "duplex full" as well (or "speed 10" and "duplex half").
  238. WARNING: DO NOT hook up hubs/switches/bridges to these
  239. specially-configured ports! The switch will become very confused.
  240. Reporting and diagnosing problems
  241. ---------------------------------
  242. Maintainers find that accurate and complete problem reports are
  243. invaluable in resolving driver problems. We are frequently not able to
  244. reproduce problems and must rely on your patience and efforts to get to
  245. the bottom of the problem.
  246. If you believe you have a driver problem here are some of the
  247. steps you should take:
  248. - Is it really a driver problem?
  249. Eliminate some variables: try different cards, different
  250. computers, different cables, different ports on the switch/hub,
  251. different versions of the kernel or of the driver, etc.
  252. - OK, it's a driver problem.
  253. You need to generate a report. Typically this is an email to the
  254. maintainer and/or netdev@vger.kernel.org. The maintainer's
  255. email address will be in the driver source or in the MAINTAINERS file.
  256. - The contents of your report will vary a lot depending upon the
  257. problem. If it's a kernel crash then you should refer to the
  258. REPORTING-BUGS file.
  259. But for most problems it is useful to provide the following:
  260. o Kernel version, driver version
  261. o A copy of the banner message which the driver generates when
  262. it is initialised. For example:
  263. eth0: 3Com PCI 3c905C Tornado at 0xa400, 00:50:da:6a:88:f0, IRQ 19
  264. 8K byte-wide RAM 5:3 Rx:Tx split, autoselect/Autonegotiate interface.
  265. MII transceiver found at address 24, status 782d.
  266. Enabling bus-master transmits and whole-frame receives.
  267. NOTE: You must provide the `debug=2' modprobe option to generate
  268. a full detection message. Please do this:
  269. modprobe 3c59x debug=2
  270. o If it is a PCI device, the relevant output from 'lspci -vx', eg:
  271. 00:09.0 Ethernet controller: 3Com Corporation 3c905C-TX [Fast Etherlink] (rev 74)
  272. Subsystem: 3Com Corporation: Unknown device 9200
  273. Flags: bus master, medium devsel, latency 32, IRQ 19
  274. I/O ports at a400 [size=128]
  275. Memory at db000000 (32-bit, non-prefetchable) [size=128]
  276. Expansion ROM at <unassigned> [disabled] [size=128K]
  277. Capabilities: [dc] Power Management version 2
  278. 00: b7 10 00 92 07 00 10 02 74 00 00 02 08 20 00 00
  279. 10: 01 a4 00 00 00 00 00 db 00 00 00 00 00 00 00 00
  280. 20: 00 00 00 00 00 00 00 00 00 00 00 00 b7 10 00 10
  281. 30: 00 00 00 00 dc 00 00 00 00 00 00 00 05 01 0a 0a
  282. o A description of the environment: 10baseT? 100baseT?
  283. full/half duplex? switched or hubbed?
  284. o Any additional module parameters which you may be providing to the driver.
  285. o Any kernel logs which are produced. The more the merrier.
  286. If this is a large file and you are sending your report to a
  287. mailing list, mention that you have the logfile, but don't send
  288. it. If you're reporting direct to the maintainer then just send
  289. it.
  290. To ensure that all kernel logs are available, add the
  291. following line to /etc/syslog.conf:
  292. kern.* /var/log/messages
  293. Then restart syslogd with:
  294. /etc/rc.d/init.d/syslog restart
  295. (The above may vary, depending upon which Linux distribution you use).
  296. o If your problem is reproducible then that's great. Try the
  297. following:
  298. 1) Increase the debug level. Usually this is done via:
  299. a) modprobe driver debug=7
  300. b) In /etc/modprobe.d/driver.conf:
  301. options driver debug=7
  302. 2) Recreate the problem with the higher debug level,
  303. send all logs to the maintainer.
  304. 3) Download you card's diagnostic tool from Donald
  305. Becker's website <http://www.scyld.com/ethercard_diag.html>.
  306. Download mii-diag.c as well. Build these.
  307. a) Run 'vortex-diag -aaee' and 'mii-diag -v' when the card is
  308. working correctly. Save the output.
  309. b) Run the above commands when the card is malfunctioning. Send
  310. both sets of output.
  311. Finally, please be patient and be prepared to do some work. You may
  312. end up working on this problem for a week or more as the maintainer
  313. asks more questions, asks for more tests, asks for patches to be
  314. applied, etc. At the end of it all, the problem may even remain
  315. unresolved.